#serp_stable,
#serp_instable,
#total_kw_url,
#lostCount {
  font-size: 23px;
  font-weight: 800
}

.kw-container {
  display: flex;
  gap: 20px;
  width: 100%;
  margin: 20px 0;
  height: 80vh;
  /* Définit la hauteur maximale du conteneur */
}

.kw-column {
  overflow-y: auto;
  /* Permet le défilement vertical */
  max-height: 100%;
  /* Prend toute la hauteur du conteneur */
  scrollbar-width: thin;
  /* Pour Firefox */
}

#KW_filter {
  width: max(200px, 10%);
  flex-shrink: 0;
}

#KW_chart,
#KW_liste {
  flex: 1;
  min-width: 0;
}

/* Style personnalisé pour la barre de défilement (Chrome/Safari) */
.kw-column::-webkit-scrollbar {
  width: 8px;
}

.kw-column::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.kw-column::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.kw-column::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Pour la réactivité sur mobile */
@media (max-width: 1024px) {
  .kw-container {
    flex-direction: column;
    height: auto;
  }

  .kw-column {
    max-height: 60vh;
    width: 100%;
  }

  #KW_filter {
    width: 100%;
    max-height: 200px;
  }
}

/* Style pour le titre de la section */
.filter-section h4 {
  color: #464E5F;
  font-size: 14px;
  margin: 15px 12px 12px 0;
}

/* Style pour chaque élément filtrable */
.filter-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: solid 1px #cecece;
}


.filter-btn.active {
  background: #815DEE;
  color: white;
}

/* Hover effect */
.filter-btn:hover {
  background: #F8F9FA;
  color: #000;
}

/* Style pour le conteneur des boutons de filtre */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Style pour le bouton de réinitialisation */

.filter-action {
  margin-top: 20px;
  min-width: 100% !important;
  margin-left: auto;
  background-color: rgb(252, 85, 79);
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #FFF;
}

#resetButton {
  padding: 10px 15px;
  background: #242424;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  margin-bottom: 10px;
  font-weight: 600
}

#siteSelector,
.gradient-button {
  box-sizing: border-box;
}

#siteSelector,
.gradient-button,
#urlNotContains,
#urlContains {
  line-height: 1;
  /* Normaliser le line-height */
  vertical-align: middle;
  height: 50px;
}

.decay-table td:first-child {
  width: 100px;
  padding: 5px;
}

.decay-table canvas {
  display: block;
  width: 100%;
  height: 20px;
}

#siteSelector,
#countrySelector,
#urlContains,
#urlNotContains {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  height: 48px;
  box-sizing: border-box;
  font-size: 16px;
  line-height: normal;
}

.button-content {
  position: relative;
  z-index: 2;
  gap: 12px;
  color: white;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  height: 50px;
  font-family: Poppins;
  ;
  align-items: center;
}

.gradient-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      #4c1d95,
      #8b5cf6,
      #4c1d95);
  background-size: 200% 100%;
  animation: moveGradient 3s linear infinite;
  z-index: 1;
}

.button-icon {
  width: 20px;
  height: 20px;
}

.gradient-button::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: linear-gradient(90deg,
      #5b21b6,
      #9333ea,
      #5b21b6);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: moveGradient 3s linear infinite;
  z-index: 1;
}

.gradient-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(76, 29, 149, 0.3);
}

.gradient-button:active {
  transform: translateY(0px);
}

.gradient-button {
  position: relative;
  padding: 0px 24px;
  height: 50px !important;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  font-family: system-ui, -apple-system, sans-serif;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#averagesChart {
  height: 100px;
}

#keywordsBarChart {
  height: 200px;
}

.legend {
  padding: 10px;
}

.avg28 {
  color: #FF6B6B;
}

.avg90 {
  color: #4ECDC4;
}

.top {
  color: #815DEE;
}

.legend_position {
  color: #F6A228;
}

.page_indexd {
  color: #FF6B6B
}

.decay-analysis {
  margin: 20px 0;
}

.decay-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.decay-table th,
.decay-table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

.decay-table th {
  background-color: #f5f5f5;
}

.url-row {
  cursor: pointer;
  transition: background-color 0.2s;
}

.url-row:hover {
  background-color: #F7EEFF;
}

.url-row.selected {
  background-color: #FCF9FF;
  border: dotted 1px #6767D9;
}

#keywordsChart {
  margin-bottom: 30px;
  max-height: 400px;
}

.query-item {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  margin-bottom: 8px;
  border-radius: 5px;
  border: solid 1px #000;
  padding: 5px;
  min-height: 30px;
  /* max-width: 200px; */
  background-color: #fff;
}

.query_btn {
  display: inline-block;
  vertical-align: middle;
  padding-left: 15px;
  padding-right: 15px;
}

.query-item:hover .query_btn {
  padding-right: 3px;
}

.query-item:hover {
  border: solid 1px #815DEE;
}

.query-item:hover .launch-analysis-icon {
  display: inline-block !important;
}



table {
  width: 100%;
  border-collapse: separate;
  /* pour permettre le border-radius */
  border-radius: 5px;
  overflow: hidden;
  /* masque les débordements des coins arrondis */
  color: #242424;
  /* couleur du texte */
}

table th {
  background-color: #242424;
  /* fond du header */
  color: #ffffff !important;
  /* texte en contraste dans le header */
  padding: 10px;
  text-align: left;
}

table td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

table tr:hover {
  background-color: #FCF9FE;
  /* couleur de fond au survol */
}

.decay-table th {
  background-color: #242424 !important
}


.analyzer-controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
  justify-content: center;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-group label {
  font-weight: 500;
  color: #666;
}

.control-group input,
.control-group select {
  min-width: 200px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.button {
  padding: 8px 16px;
  height: 38px;
  align-self: flex-end;
}

.decay-table td {
  text-align: center;
  white-space: normal;
  /* Autorise le retour à la ligne */
  word-wrap: break-word;
  /* Permet de couper les mots trop longs */
}

.url {
  max-width: 600px;
}

.currentcount {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

/* Style général des boutons */
#trendFilters button {
  padding: 5px 10px;
  margin-right: 5px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.3s, border-color 0.3s;
}

#trendFilters button:hover {
  opacity: 0.9;
}

/* Styles spécifiques pour chaque bouton */
#filterHausse {
  color: #24C789;
  border-color: #24C789;
  border: 2px solid #24C789;
  background-color: #C4F0DF;
}

#filterStable {
  color: #F6A228;
  border-color: #F6A228;
  border: 2px solid #F6A228;
  background-color: #FCE6C5;
}

#filterBaisse {
  color: #FC554F;
  border-color: #FC554F;
  border: 2px solid #FC554F;
  background-color: #FED1CF;
}

#filterReset {
  color: #fff;
  ;
  border: 2px solid #000;
  border-color: #000;
  background-color: #303030;
}

/* Ajout des icônes flèche via pseudo-éléments */
#filterHausse::before {
  content: "↑";
  margin-right: 5px;
  color: #24C789;
  font-size: 16px;
}

#filterStable::before {
  content: "→";
  margin-right: 5px;
  color: #F6A228;
  font-size: 16px;
}

#filterBaisse::before {
  content: "↓";
  margin-right: 5px;
  color: #FC554F;
  font-size: 16px;
}

#filterReset:before {
  content: "=";
  font-size: 16px;
}

.queries-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queries-list {
  flex-grow: 1;
}

.launch-icon-container {
  width: 24px;
  margin-left: 10px;
}

.launch-analysis-icon {
  width: 24px;
  height: 24px;
  transition: opacity 0.3s ease;
}



#container_options {
  display: none;
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}


#container_options select,
#container_options input {
  width: 250px;
  margin-left: 15px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  height: 48px;
  box-sizing: border-box;
  font-size: 16px;
  line-height: normal;
}

#container_message_lancement {
  display: none;
  margin: 10px 0;
  padding: 10px;
  border-radius: 4px;
}

.error {
  background-color: #f8d7da;
  color: #FC554F;
}

.query-metrics {
  margin-left: 15px;
  padding-left: 10px;
  gap: 5px;
  border-left: 1px solid #EBEBEB;
  display: flex;
  align-items: center;
}

.query-info {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Espace entre le select et le texte */
}

.clicks,
.position,
.impressions {
  font-weight: 600;
  padding-left: 2px;
  padding-right: 2px;
}

.position {
  color: #D9782F;

}

.clicks {
  color: #5383EC
}

.impressions {
  color: #5837AA
}


.priority-critical {
  color: #FC554F;
}

.priority-high {
  color: #F6A228;
}

.priority-medium {
  color: #F6D428;
}

.priority-low {
  color: #24C789;
}

.decay-table th {
  cursor: pointer;
  position: relative;
  user-select: none;
}

.decay-table th:hover {
  background-color: #f5f5f5;
}

.decay-table th.sorting-asc::after {
  content: "▲";
  position: absolute;
  right: 8px;
  color: #666;
}

.decay-table th.sorting-desc::after {
  content: "▼";
  position: absolute;
  right: 8px;
  color: #666;
}

.decay-table td.url {
  /* Supprimer display: flex */
  position: relative;
  /* Pour le positionnement de l'icône */
  text-align: left;
  /* Aligner le texte à gauche */
  padding-left: 35px;
  /* Espace pour l'icône */
}

.peak-status-icon {
  position: absolute;
  left: 5px;
  /* Position depuis la gauche */
  top: 50%;
  /* Centrer verticalement */
  transform: translateY(-50%);
  cursor: help;
  padding: 4px;
  margin-right: 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: normal;
  /* Permettre le retour à la ligne */
}

.peak-status-icon:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 12px;
  width: max-content;
  max-width: 400px;
  z-index: 10;
  font-size: 0.9em;
  line-height: 1.4;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.peak-status-icon.current-peak {
  color: #059669;
  background: #ECFDF5;
}

.peak-status-icon.recent-peak {
  color: #22C55E;
  background: #F0FDF4;
}

.peak-status-icon.stable {
  color: #059669;
  background: #D1FAE5;
}

.peak-status-icon.critical {
  color: #FC554F;
  background: #FEE2E2;
}

.peak-status-icon.warning {
  color: #F59E0B;
  background: #FEF3C7;
}

.peak-status-icon.attention {
  color: #6366F1;
  background: #E0E7FF;
}

.url-text {
  flex-grow: 1;
}

.urls-table {
  max-height: 80vh;
  overflow-y: auto;
}

.decay-table thead {
  position: sticky !important;
  top: 0;
  z-index: 10;
  /* Optionnel : ajouter une ombre pour mieux séparer l'en-tête */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Optionnel : assurer que le tableau prend toute la largeur */
.decay-table {
  width: 100%;
  border-collapse: collapse;
}

#module_avancement {
  display: none;
}

#metric-label {
  color: #000
}

/* Pour les mots-clés stables */
.keyword-status[data-status="stable"] {
  background-color: #C4F0DF;
  color: #24C789;
}

/* Pour les mots-clés fluctuants */
.keyword-status[data-status="fluctuant"] {
  background-color: #FCE6C5;
  color: #F6A228;
}

/* Pour les mots-clés perdus */
.keyword-status[data-status="lost"] {
  background-color: #FED1CF;
  color: #FC554F;
}


.metric-dropout {
  background-color: #FED1CF;
  border: solid 1px #FC554F;


}

.metric-timetop,
.metric-posmax {
  background-color: #C4F0DF;
  border: solid 1px #24C789;
}

.metric-posmoy {
  background-color: #FCE6C5;
  border: solid 1px #F6A228;
}

.progress-container {
  margin: 1em 0;
}

#weeksCollected {
  display: inline-block;
  margin-bottom: 0.3em;
  font-weight: bold;
}

.progress-wrapper {
  position: relative;
  width: 100%;
  height: 8px;
  /* Hauteur fine */
  background-color: #DDD3FA;
  border-radius: 9999px;
  /* Barre très arrondie */
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #815DEE;
  border-radius: 9999px;
  width: 0;
  /* Largeur initiale à 0% */
  transition: width 0.3s ease-in-out;
}

.keyword-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.keyword-card.selected {
  border-color: #815DEE;
  box-shadow: 0 0 0 2px rgba(129, 93, 238, 0.2);
}

/* Container principal */
.kw-analysis-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - 200px);
  background: white;
  border-radius: 8px;
}

/* Section du graphique */
.keyword-chart-fixed {
  flex: 0 0 300px;
  position: relative;
  width: 100%;
  padding: 20px;
  background: white;
}

/* Section scrollable de l'historique */
.keyword-history-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Conteneur de l'historique */
.keyword-history-container {
  padding: 20px;
  background: white;
}

/* Titre de l'historique */
.history-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 20px;
}

/* Entrées d'historique communes */
.history-entry {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid;
}

/* Types d'entrées spécifiques */
.history-entry.current {
  border-left-color: #815DEE;
  margin-bottom: 24px;
}

.history-entry.current.warning {
  border-left-color: #FC554F;
}

.history-entry.drop {
  border-left-color: #FC554F;
}

.history-entry.move {
  border-left-color: #F6A228;
}

.history-entry.stable {
  border-left-color: #F6A228;
}

/* Titre des entrées */
.entry-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
}

/* Date des entrées */
.entry-date {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

/* Contenu des entrées */
.entry-content {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #333;
  line-height: 1.6;
}

/* Indicateur de changement de position */
.position-change {
  display: inline-block;
  margin-left: 8px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
}

/* Personnalisation de la scrollbar */
.keyword-history-scroll::-webkit-scrollbar {
  width: 6px;
}

.keyword-history-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.keyword-history-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.keyword-history-scroll::-webkit-scrollbar-thumb:hover {
  background: #666;
}


.keyword-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
  margin-bottom: 16px;
  border: 1px solid #edf2f7;
}

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

.keyword-text {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.keyword-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.keyword-status[data-status="stable"] {
  background: #C6F6D5;
  color: #22543D;
}

.keyword-status[data-status="unstable"] {
  background: #FEEBC8;
  color: #744210;
}

.keyword-status[data-status="lost"] {
  background: #FED7D7;
  color: #822727;
}

.metrics-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.metric-item {
  flex: 1;
  min-width: 0;
  background: #f7fafc;
  padding: 8px 12px;
  border-radius: 8px;
}

.metric-label {
  font-size: 12px;
  color: #000;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.metric-item.appearances .metric-value,
.metric-item.dropout .metric-value {
  color: #4a5568;
}

/* Styles spécifiques selon le statut */
.keyword-card[data-status="lost"] .dropout {
  background: #FED1CF;
}

.keyword-card[data-status="unstable"] .appearances {
  background: #FEEBC8;
}

.keyword-card[data-status="fluctuant"] .appearances {
  background: #FEEBC8;
}

.metric-clics,
.metric-impressions,
.metric-appearances {
  border: solid 1px #815DEE;
}

.keyword-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
}

.keyword-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  position: relative;
}

.keyword-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.keyword-main {
  flex: 1;
}

.analyze-button {
  display: none;
  /* Caché par défaut */
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background-color: #fff;
  color: #815DEE;
  border: solid 1px #815DEE;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
  margin-left: auto;
  /* Force le bouton à se positionner après le titre */
  order: 2;
  /* Définit l'ordre des éléments */
}

.analyze-button img {
  height: 16px;
  width: auto;
}

.keyword-card:hover .analyze-button {
  display: flex;
}

.keyword-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #666;
  order: 3;
  /* Place le statut après le bouton */
}

.analyze-button:hover {
  background-color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
  border: solid 2px #815DEE;
  font-weight: 700;
}

.analyze-button img {
  height: 16px;
  width: auto;
}

.keyword-card:hover .analyze-button {
  display: flex;
}

.url-content-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.query-url {
  white-space: normal;
  max-height: 3em;
  /* limite à environ 2-3 lignes */
  overflow: hidden;
}

.peak-status-icon {
  flex-shrink: 0;
  margin-right: 5px;
}

.details-icon {
  flex-shrink: 0;
  margin-left: 5px;
}

td.url {
  max-width: 700px;
  /* Ajustez cette valeur selon vos besoins */
  width: 600px;
}

.pagination-controls{
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

.pagination-controls .active{
  background-color: #ECF5F2;
}

#vision_micro
{
  margin-top: 30px !important;
  margin-right: auto !important;
  margin-bottom: 30px !important;
  margin-left: auto !important;
}

#filtres_additions
{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#filtres_additions .filter-tag{
  margin: 0;
}