/* -------------------------------------------------
   B‑viewer — Améliorations de style
   ------------------------------------------------- */

/* ---------- Sidebar : style moderne avec FontAwesome ---------- */
.tab-button i {
  margin-right: 12px;
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: white;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.tab-button:hover i {
  opacity: 1;
}

/* ---------- Zone d'analyse principale ---------- */
.analysis-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  position: relative;
  background: #f8f9fa;
  border-radius: 16px;
  padding: 20px;
  overflow: hidden;
}

/* Timeline des analyses avec délimitation claire */
.timeline-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 10px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 #f8f9fa;
}

.timeline-container::-webkit-scrollbar {
  width: 8px;
}

.timeline-container::-webkit-scrollbar-track {
  background: #f8f9fa;
}

.timeline-container::-webkit-scrollbar-thumb {
  background-color: #e2e8f0;
  border-radius: 4px;
}

/* ---------- Zone de saisie style ChatGPT ---------- */
.chat-input-container {
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.chat-textarea-container {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 14px 0;
}

.chat-textarea-container:focus-within {
  border-color: #3182ce;
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.chat-textarea {
  border: none;
  outline: none;
  resize: none;
  width: 100%;
  padding: 0 60px 0 20px;
  font-size: 15px;
  line-height: 1.5;
  max-height: 200px;
  background: transparent;
}

.chat-send-button {
  position: absolute;
  right: 12px;
  bottom: 10px;
  background: #4299e1;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-send-button:hover {
  background: #3182ce;
}

.chat-send-button:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
}

.chat-toolbar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 12px;
}

.chat-dropdown {
  margin-right: 12px;
  position: relative;
}

.chat-dropdown-label {
  font-size: 13px;
  color: #4a5568;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ---------- Cartes d'analyse ---------- */
.analysis-card {
  margin-bottom: 30px;
  padding: 5px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: transform .3s, box-shadow .3s;
}

.analysis-flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  overflow: hidden;
  width: 100%;
}

.graph-container {
  flex: 1.2;
  min-width: 300px;
}

.recommendations-container {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.recommendations-content {
  height: auto !important;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background: #f8fafc;
  border-radius: 12px;
  transition: max-height 0.3s ease;
}


/* Animation d'apparition des cartes */
@keyframes fadeInUp {
  from {opacity: 0; transform: translateY(20px);}
  to {opacity: 1; transform: translateY(0);}
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Compteur d'utilisation --- */
.usage-counter-container {
  text-align: center;
  margin-top: 12px;
}

.usage-counter {
  display: inline-flex;
  align-items: center;
  background-color: #EDF2F7;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 13px;
  color: #1a365d;
  font-weight: 500;
  border: 1px solid #CBD5E0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.usage-counter i {
  margin-right: 8px;
  color: #4299e1;
}

/* Effet ripple */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  0% {transform: scale(0); opacity: 0.5;}
  100% {transform: scale(2); opacity: 0;}
}

/* Style pour les cartes d'erreur */
.error-card {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
}

.error-content {
  font-family: monospace;
  white-space: pre-wrap;
}

/* Style pour les cartes avec problèmes de recommandation */
.recommendation-issue .recommendations-content {
  background: #fff8f0;
  border-left: 4px solid #ed8936;
}

/* Styles pour l'animation de chargement */
.analysis-loading-spinner {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.spinner-grow {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: 0 3px;
  background-color: #3182ce;
  border-radius: 50%;
  animation: spinner-grow 1.5s ease-in-out infinite;
}
@keyframes spinner-grow {
  0%, 100% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1); opacity: 1; }
}
.analysis-loading-text {
  color: #2c5282;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}
/* --- Correctif : supprimer le cadre interne doublon --- */
.chat-textarea,
.chat-textarea:focus,
.chat-textarea:hover{
  border:none !important;
  box-shadow:none !important;
  outline:none !important;
}

/* ─────  dcc.Dropdown  : un seul cadre, zéro trait parasite  ───── */

/* 1)  On enlève le « halo » interne que React‑Select ajoute au focus/hover */
.chat-dropdown .Select-control,
.chat-dropdown .Select-control:hover,
.chat-dropdown .Select-control:focus,
.chat-dropdown .Select-control.is-focused,
.chat-dropdown .Select-control.is-open{
  box-shadow: none !important;            /* supprime le 2ᵉ trait bleu */
  border:none !important;                /* supprime le cadre interne */
}

/* 2)  On neutralise la bordure + box‑shadow de l’input caché
       (c’est la règle générique  input:focus{…}  de *styles.css* qui les ajoute) :contentReference[oaicite:0]{index=0}:contentReference[oaicite:1]{index=1} */
.chat-dropdown .Select-input input,
.chat-dropdown .Select-input input:focus{
  border: none !important;                /* plus de bordure interne */
  box-shadow: none !important;            /* plus de 2ᵉ trait */
  outline: none !important;
}

/* 3)  On retire aussi les petits séparateurs de 1 px entre la croix et la flèche */
.chat-dropdown .Select-clear-zone,
.chat-dropdown .Select-arrow-zone,
.chat-dropdown [class*="indicatorSeparator"]{
  border-left: none !important;
  display: none !important;
}


