header, footer {
    width: 100%;
    padding: 15px;
    text-align: center;
    box-sizing: border-box;
}

footer {
    position: relative;
    bottom: 0;
    /* background-color: rgba(0,0,0,0.1); */
}

/* Rendre le main plus large UNIQUEMENT pour cette page */
main {
    width: 100%; /* Assure l'élargissement clair */
    max-width: none; /* Enlève toute restriction antérieure */
    padding-left: 80px; /* évite tout chevauchement sidebar */
    padding-right: 20px; /* marge confortable à droite */
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    margin: 0; padding: 0;
}
/* Correction immédiate : cacher précisément le titre uniquement dans indicator-settings sur trading_live_F.html */
body.trading-futures .indicator-settings .settings-column:first-child::before {
    display: none !important;
    content: none !important;
}


/* DARK MODE */
body.dark-mode { background-color: #1f2232; color: #f0f4ff; }
body.dark-mode header { background: linear-gradient(to right, #3b3f58, #26293d); box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
body.dark-mode .sidebar { background-color: #171a29; }
body.dark-mode .settings-menu { background-color: #272c45; }
body.dark-mode select,
body.dark-mode input[type="number"] {
    background-color: #424768; /* pastel doux bleu-violet foncé */
    color: #f0f4ff; /* texte clair pour bonne lisibilité */
    border: 1px solid #6366F1; /* bordure légère pour élégance */
}


/* LIGHT MODE */
body.light-mode { background-color: #ffffff; color: #3a3b4d; }
body.light-mode header { background: linear-gradient(to right, #ccd6ff, #e7ebff); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
body.light-mode .sidebar { background-color: #e5eaf7; }
body.light-mode .settings-menu { background-color: #f4f7ff; }
body.light-mode .sidebar nav a {
    color: #3a3b4d; /* Couleur sombre nette, très visible en thème clair */
}


/* Sidebar */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100%;
    padding: 20px;
    padding-top: 70px; /* augmentation du padding-top précisément ici pour baisser la colonne */
    transition: left 0.3s;
    z-index: 1200;
    box-sizing: border-box; /* important pour éviter tout dépassement */
    color: #000000;      /* ← texte gris #999999 */
    text-decoration: none;
}

.sidebar.active { left: 0; }
nav a { display:block; margin:10px 0; text-decoration:none; color: #374751;}

/* Boutons harmonisés (Sidebar + Paramètres) */
.btn-icon {
    position: fixed; top: 15px; width: 34px; height: 34px; background-color: #6366F1;
    border-radius: 8px; border: 1px solid #aeb8ff; color: #ffffff;
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    font-size: 1.2em; padding: 0; 
}
.btn-icon:hover { background-color: #5052c7; }

/* 1️⃣  Bouton ☰ – priorité absolue et position au bord du menu */
.btn-icon.left {
    left: 15px;          /* 250 px (largeur menu) + 15 px de marge */
    z-index: 2500;        /* au-dessus de tout : sidebar 1200, menu thème 2000 */
}

.btn-icon.right {
    right: 15px;
    z-index: 2500; 
}

/* Agrandir clairement tous les checkboxes du site */
input[type="checkbox"] {
    transform: scale(1.3); /* 👈 agrandit précisément tous les checkboxes (1.2 à 1.5 idéal) */
    margin-right: 6px; /* un peu d'espace pour rester clair */
    cursor: pointer;
}


/* Settings menu */
/* fenêtre paramètres (conserve tes styles actuels) */
.settings-menu {
    position: fixed;
    top: 55px;
    right: 15px;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background: #1e1e1e;    /* fond gris foncé homogène */
    z-index: 2000;          /* sous l’icône, au-dessus du contenu */
}
.settings-menu.hidden { display: none; }

.settings-menu button {
    margin: 5px;
    padding: 5px 10px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background-color: #6366F1;
    color: #fff;
}

.settings-menu button:hover {
    background-color: #5052c7;
}

.description {
    background-color: rgba(99,102,241,0.1); /* fond doux clair/violet léger */
    border: 1px solid rgba(99,102,241,0.4); /* bordure fine, élégante */
    border-radius: 10px; /* coins arrondis doux et pro */
    padding: 20px;
    margin: 100px auto 20px auto;
    width: 100%;
    max-width: 1000px; /* on garde la plus grande valeur */
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* ombre légère élégante */
}

.description h2 {
    color: #6366F1;
    margin-bottom: 15px;
}

.avantages {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
    display: inline-block;
}

.avantages li {
    margin: 10px 0;
    font-size: 1.1em;
}

.btn-dashboard {
    display: inline-block;
    padding: 10px 15px;
    background-color: #6366F1;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-dashboard:hover {
    background-color: #5052c7;
}

.btn-container {
    text-align: center;
    margin-top: 20px;
}

.dashboard-stats {
    margin-top: 40px;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 160px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stats-grid-futures {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
    background-color: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.4);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin-top: 25px;
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* empêche clairement le retour à la ligne */
}

.stats-grid-futures .stat-card {
    flex: 1;
    min-width: 0; /* assure précisément une répartition égale */
    padding: 10px 15px;
}

.stat-value {
    font-size: 1.8em;
    color: #6366F1;
    font-weight: bold;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #888;
    margin-top: 5px;
}

.dashboard-graph {
    max-width: 700px;
    margin: 40px auto;
}

.recent-trades {
    max-width: 700px;
    margin: 40px auto;
}

.recent-trades table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.recent-trades th, .recent-trades td {
    border: 1px solid rgba(99,102,241,0.3);
    padding: 10px;
    text-align: center;
}

.recent-trades th {
    background-color: rgba(99,102,241,0.2);
    color: #6366F1;
}

.recent-trades tbody tr:nth-child(even) {
    background-color: rgba(99,102,241,0.05);
}
.bot-settings {
    max-width: 1000px; margin: 30px auto; padding: 20px;
    background-color: rgba(99,102,241,0.1); border-radius: 10px;
    border: 1px solid rgba(99,102,241,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bot-settings h2 {
    text-align: center; margin-bottom: 20px; color: #6366F1;
}

.settings-grid {
    display: flex; 
    justify-content: space-between;
    gap: 20px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    width: 48%;
}

label {
    margin-top: 10px; font-weight: bold; padding-bottom: 2px;
}

select, input[type="number"] {
    padding: 6px 10px; 
    border-radius: 6px; border: 1px solid #ccc;
    width: 100%; box-sizing: border-box;
}

summary {
    cursor: pointer; 
    font-weight: bold;
    margin-bottom: 4px; /* 👈 Petite marge esthétique */
    padding-top: 10px;  
}

.btn-launch {
    padding: 10px 15px; background-color: #6366F1;
    color: #fff; border: none; border-radius: 6px; cursor: pointer;
    display: block; margin: 20px auto;
}

.btn-launch:hover { background-color: #5052c7; }

.indicators-grid {
    display: flex; flex-direction: column;
    gap: 10px; 
}

.indicator-item {
    display: flex; align-items: center; justify-content: space-between;
    background-color: rgba(99,102,241,0.1);
    border-radius: 8px; padding: 8px;
    border: 1px solid rgba(99,102,241,0.3);
    margin-bottom: 0;
}

.indicator-item button {
    background-color: #6366F1; color: #fff; border: none;
    border-radius: 6px; cursor: pointer; padding: 5px 10px;
}

.indicator-item button:hover {
    background-color: #5052c7;
}

.indicator-confirmation {
    display: block; margin-top: 15px; padding-top: 10px;
    border-top: 1px dashed rgba(99,102,241,0.3);
}

.indicator-confirmation select {
    width: 100%; padding: 5px; margin-top: 5px;
    border-radius: 6px; border: 1px solid #ccc;
    box-sizing: border-box;
}

.indicator-settings.content {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
}

.settings-columns-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Nouveau CSS propre pour afficher clairement les trades en Spot, Futures, Backtest */
.trade-grid {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Écart clair mais compact entre les trades */
    width: 100%; /* Assure une largeur complète */
    box-sizing: border-box;
}

.trade-grid .trade-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.4);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.trade-grid .trade-item .trade-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    background-color: #6366F1; /* Bleu original précis (comme au survol auparavant) */
    padding: 10px 15px;
    border-radius: 6px;
    color: #ffffff;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.trade-grid .trade-item .trade-header:hover {
    background-color: #5052c7; /* Bleu foncé légèrement plus doux au survol */
}


.settings-column {
    padding: 2px 0;           /* Plus petit padding vertical */
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0px;                 /* Aucun espace supplémentaire entre les lignes */
}

.settings-column label {
    display: flex;
    justify-content: space-between;
    align-items: center;      /* Centrage vertical strict */
    gap: 6px;                 /* Moins d’espace entre texte et valeur */
    padding: 2px 0;           /* Réduction espace autour du label */
    font-size: 1em;           /* Taille standard, ajustable selon ta préférence */
    line-height: 1.1;         /* Hauteur très compacte */
    margin: 0;
}

.settings-column label strong {
    font-weight: 700;
    line-height: 1.1;
    display: inline-block;
    min-width: 60px;
    text-align: right;
    margin: 0;                /* Supprime tout espace en haut/bas */
    padding: 0;               /* Plus d’espace parasite */
}



.sl-options {
    padding: 10px; display: flex; flex-direction: column;
    gap: 10px;
}

.sl-options label {
    font-weight: bold;
}

/* Exception précise pour le bloc RSI & SMA */
#rsi_settings_block {
    margin-top: -10px !important; /* ajuste précisément cette valeur si nécessaire */
}

.sl-settings-block {
    margin-left: 20px;
    padding: 10px;
    background-color: rgba(99,102,241,0.1);
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,0.3);
}

.sl-settings-block input {
    width: 100%; padding: 6px 10px;
    border-radius: 6px; border: 1px solid #ccc;
    margin-top: 5px; box-sizing: border-box;
}

.sl-types {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* écartement généreux augmenté clairement ici */
    justify-content: center; /* parfaitement centré ici */
    align-items: center;
    margin-bottom: 15px; /* un peu d'espace en dessous pour l'esthétique */
}

.sl-types label {
    font-weight: bold;
    white-space: nowrap; /* évite les retours à la ligne internes */
}

.bot-results {
    background-color: rgba(99,102,241,0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 30px auto;
    max-width: 1000px;
    border: 1px solid rgba(99,102,241,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
}

.bot-results h2 {
    margin-bottom: 15px;
    color: #6366F1;
}

.bot-results canvas {
    margin: 0 auto;
    max-width: 100%;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Fenêtre déroulante claire et légère */
.indicator-settings {
    background-color: rgba(99,102,241,0.15);
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,0.4);
    padding: 15px;
    margin-top: -10px;
}

.info {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 15px;
}

/* Grille parfaite en 2 ou 3 colonnes selon besoin */
.settings-columns-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

/* 👇 Styles pour 1 colonne */
.settings-columns-grid.one-columns {
    display: grid;
    grid-template-columns: 1fr;
}

/* Annule le max-width et marges de .dashboard-graph */
.settings-columns-grid.one-columns .dashboard-graph {
    max-width: none !important;
    width: 100%     !important;
    margin: 0       !important;
  }
  
/* 👇 Styles pour 2 colonnes */
.settings-columns-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

/* 👇 Styles pour 3 colonnes */
.settings-columns-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

/* Alignement vertical précis des labels et inputs */
.settings-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-column label {
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

/* Ajustement précis du checkbox général */
.settings-column label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    cursor: pointer;
    margin-right: 16px;
}

/* Alignement parfait des inputs à droite */
.settings-column input[type="number"] {
    margin-right: 30px;
    width: 60px;
    padding: 3px 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    text-align: right;
}

/* Titres des colonnes parfaitement centrés */
.settings-column strong {
    display: block;
    text-align: center;
    margin-bottom: 12px;
}

/* Titre automatique pour colonne de paramètres généraux */
.settings-column:first-child::before {
    content: "⚙️ Paramètres généraux";
    display: block;
    text-align: center;
    font-weight: bold;
    margin-bottom: 12px;
}

/* Supprime uniquement le titre "⚙️ Paramètres généraux" des fenêtres de trade */
.trade-grid .settings-column:first-child::before {
    content: none !important;
    display: none !important;
}


/* Ajustement spécifique pour MACD et similaires */
#macd_settings_block .settings-columns-grid,
#bollinger_settings_block .settings-columns-grid {
    align-items: flex-end;
}

/* Ajustements spécifiques pour selects (colonne Bollinger par exemple) */
.settings-column.select-align label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-column select {
    width: 160px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    text-align: right;
}

.btn-save {
    padding: 10px 15px;
    background-color: #10B981; /* vert clair */
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-save:hover {
    background-color: #0d9165; /* vert foncé */
}

/* Styles spécifiques pour les pages Trading Futures avec graphiques dynamiques */

.collapsible {
    background-color: #374151;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: bold;
    color: #fff;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #5052c7;
}

.content {
    display: none;
    overflow: hidden;
    background-color: rgba(99,102,241,0.15);
    border-radius: 0 0 8px 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(99,102,241,0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.content table {
    width: 100%;
    border-collapse: collapse;
}

.content table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(99,102,241,0.3);
}

.content table tr:last-child td {
    border-bottom: none;
}

.chart-container {
    margin-top: 15px;
    height: 300px;
}

.positive { color: #22c55e; }
.negative { color: #ef4444; }

.indicator-panel-left {
    width: 200px;
    background-color: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
  }

.btn-indicator-toggle {
    position: absolute;
    top: 12px;
    left: 70px;
    z-index: 1001;
    background-color: #6366F1;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
  }

.btn-floating-toggle {
    position: absolute;
    top: 12px;
    left: 65px;
    z-index: 1001;
    background-color: #6366F1;
    color: white;
    font-size: 20px;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
  }
  
.indicator-panel-float {
  position: absolute;
  top: 12px;
  left: 110px;
  width: 200px;
  z-index: 3000;
  background-color: rgba(30, 30, 30, 0.95);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.indicator-panel-float h3 {
    margin: 0 0 0 0;
    font-size: 16px;
    color: #e0e0e0;
    font-weight: 600;
    position: absolute;
    z-index: 1000;
}

.live-graph {
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

.indicator-panel-float.hidden {
    display: none;
}

.indicator-panel-float button {
  background: rgba(0, 128, 255, 0.1); /* bleu clair test */
  margin: 0 !important;
}

.chart-area {
  position: relative;
  overflow: visible; /* ← autorise la fenêtre à dépasser */
}

.indicator-panel.hidden {
  display: none !important;
}

#chart-canvas,
#rsi-canvas,
#macd-canvas {
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  display: block;
  box-sizing: border-box;
}

#rsi-panel,
#macd-panel {
  margin-top: 10px;
  border: none !important; /* supprime le contour autour des panneaux */
  padding: 0 !important;   /* supprime le padding inutile */
  box-sizing: border-box;
}

.sidebar-indicateurs {
    width: 200px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    position: absolute;
    top: 40px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-indicateurs button.toggle-btn {
    width: 100%;
    text-align: center;
    padding: 6px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.sidebar-indicateurs button.toggle-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
}
#margin-leverage-block {
    position: relative;
    z-index: 1500; /* plus élevé que sidebar (1200) */
    overflow: visible;
    padding-bottom: 20px; /* espace supplémentaire en bas */
}

.trade-content        { display:none; }
.trade-content.open   { display:block; }

.indicator-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #222;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
}

.indicator-panel {
  position: absolute;
  top: 40px;
  left: 10px;
  background: #111;
  color: #eee;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 4px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.indicator-panel.hidden {
  display: none;
}

.trade-header.bot-only {
  background-color: #2e7d32; /* vert foncé */
  color: white;
}

.trade-header.trade-active {
  background-color: #b71c1c; /* rouge foncé */
  color: white;
}

/* ✅ NOUVEAUX ÉTATS POUR LES BOUTONS */
.trade-header.bot-paused {
  background-color: #ff8f00; /* orange - bot en pause */
  color: white;
}

.trade-header.bot-ready {
  background-color: #1976d2; /* bleu - prêt à relancer */
  color: white;
}

/* ✅ ANIMATIONS POUR LES NOTIFICATIONS */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.indicateurs-valeurs {
  white-space: pre-line;
  font-size: 1em;
  line-height: 1.1;
}
/*---------------------------------------------------------*/
.trade-flex-row {
  display: flex;
  gap: 28px;
  margin: 22px 0 10px 0;
}
.trade-flex-colA {
  flex: 1 1 0;
  min-width: 220px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-right: 1.5px solid #333;
  padding-right: 16px;
}
.trade-flex-colB {
  flex: 2 1 0;
  min-width: 320px;
  display: flex;
  align-items: stretch;
}
.trade-b-encadre {
  display: flex;
  /*gap: 16px;*/
  background-color: rgba(99, 102, 241, 0.08);
  border-radius: 10px;
  /*padding: 16px;*/
  padding-top: 10px;
  padding-bottom: 10px;
  border: 0.5px solid #282c38;
  width: 100%;
}
.trade-b1, .trade-b2 {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-right: 15px;
}

/* TITRES alignés en haut avec espace sous le titre */
.trade-b1 .panel-title,
.trade-b2 .panel-title {
  margin-top: 0;
  margin-bottom: 13px;
  font-size: 1.08em;
  line-height: 1.13;
  font-weight: 700;
  color: #324167;
}

/* Alignement infos : nom à gauche, valeur à droite */
.trade-flex-colA > div,
.trade-b1 > div:not(.panel-title),
.trade-b2 > div:not(.panel-title) {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 0 2px 0;
}
.trade-flex-colA strong,
.trade-b1 .label,
.trade-b2 .label {
  text-align: left;
  font-weight: 600;
}
.trade-flex-colA span,
.trade-b1 span,
.trade-b2 span {
  /*text-align: right;*/
  font-weight: 500;
  min-width: 48px;
}

/* Si deux titres à la suite (ex: Statistiques dans .trade-b2) */
.trade-b2 .panel-title + .panel-title {
  margin-top: 18px;
  margin-bottom: 10px;
}

.trade-b1 {
  border-right: 1px solid #333;
  /* padding-right: 10px; */
  padding-right: 25px;
}

.line-2val {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.val-right {
  display: inline-flex;
  align-items: center;
  gap: 4px; /* réduit ou met 2px pour coller encore plus */
}

.val-right > span {
  margin: 0;
  padding: 0;
  min-width: unset;
  font-variant-numeric: tabular-nums;
}
.sep {
  margin: 0 3px;
  opacity: 0.7;
}

.trade-actions {
  margin: 22px 0 16px 0;
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.trade-actions button {
  flex: 1 1 0;
  min-width: 120px;
  max-width: 200px;
  padding: 12px 0;
  border-radius: 7px;
  border: none;
  background: linear-gradient(90deg,#4751be 40%, #283152 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.08em;
  cursor: pointer;
  transition: background .16s, color .12s, box-shadow .15s;
  box-shadow: 0 1px 4px #20274430;
  outline: none;
}
.trade-actions button:hover {
  background: linear-gradient(90deg, #5a7be9 0%, #354d89 100%);
  color: #fff;
}

.btn-histo {
  width: 100%;
  min-width: 0;
  max-width: unset;
  padding: 12px 0;
  border-radius: 7px;
  border: none;
  background: linear-gradient(90deg,#4751be 40%, #283152 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.08em;
  cursor: pointer;
  margin-top: 14px;
  transition: background .16s, color .12s, box-shadow .15s;
  box-shadow: 0 1px 4px #20274430;
  outline: none;
  display: block;
}
.btn-histo:hover {
  background: linear-gradient(90deg, #5a7be9 0%, #354d89 100%);
  color: #fff;
}

.line-indic.full-width {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 10px;
  box-sizing: border-box;
  overflow: hidden;         /* <-- coupe tout débordement */
}

.indic-label {
  min-width: 90px;
  text-align: left;
  flex: 0 0 90px;
  white-space: nowrap;
}

.indic-flex {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.indic-actuel,
.indic-attendu {
  text-align: right;
  font-weight: 600;
}

.indic-sep {
  color: #666;
  font-weight: bold;
  margin: 0 px;
  font-size: 1.1em;
  /* Ajoute ce que tu veux ici ! */
}

.macd-active {
  color: #fff;
  background: #c00;
  animation: blink 1s linear infinite;
  border-radius: 4px;
  padding: 0 6px;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.4; }
}

#pair-filter-buttons button {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid #bbb;
  background: #f5f5f5;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}
#pair-filter-buttons button:hover,
#pair-filter-buttons button.active {
  background: #e0e0e0;
  border-color: #888;
}
#pair-filter-buttons {
  display: flex;
  gap: 4px;
  margin: 6px 0;
  flex-wrap: wrap;
}

input[type="text"][readonly], input[type="text"], input[type="number"] {
  border-radius: 6px;
  border: 1px solid #bbb;
  padding: 6px 8px;
  background: #fafafa;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
  width: 100%;
}
input[type="text"][readonly] {
  background: #f0f0f0;
  color: #222;
  opacity: 1; /* garde le texte bien visible */
}
input[type="text"]:focus, input[type="number"]:focus {
  border-color: #888;
  box-shadow: 0 1px 4px rgba(60,60,60,0.07);
}

.settings-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  margin-top: 10px;
}
.bloc-title {
  font-weight: bold;
  font-size: 16px;
}
.general-title {
  font-size: 15px;
  font-weight: bold;
  color: #888;
  white-space: nowrap;
  text-align: right;
  margin-left: auto;
  letter-spacing: 0.2px;
}

.gestion-avancee-block .settings-column:first-child::before {
    content: none !important;
    display: none !important;
}

.login-split-page {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.login-left {
  flex: 1.2;
  background: linear-gradient(135deg, #e7ebff 70%, #ccd6ff 100%);
  /* Utilise ici tes couleurs light/dark si tu veux switcher en JS plus tard */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 70px 60px 70px 12vw;
  min-width: 340px;
}

.login-left h1 {
  font-size: 2.5rem;
  color: #6366F1;
  margin-bottom: 28px;
  font-weight: 900;
  letter-spacing: 1px;
}

.login-left .slogan {
  font-size: 1.5rem;
  margin-bottom: 28px;
  font-weight: 600;
  color: #324167;
}

.login-left .quote {
  font-size: 1.1rem;
  color: #555;
  margin-top: 22px;
}

.login-right {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 340px;
}

.login-box {
  min-width: 320px;
  background: rgba(99,102,241,0.06);
  border-radius: 16px;
  box-shadow: 0 6px 32px 0 rgba(80,80,120,0.10);
  padding: 38px 34px;
  text-align: center;
}

.login-box h2 {
  font-size: 1.25rem;
  margin-bottom: 18px;
  font-weight: 700;
  color: #6366F1;
}

.login-box input[type="password"] {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 16px;
  font-size: 1.08em;
}

.login-box .btn-dashboard {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 1.08em;
  border-radius: 8px;
}

.login-box .login-info {
  color: #888;
  font-size: 13px;
  margin-top: 8px;
}

@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

/* Logo + nom côte à côte et centré dans la barre */
.topbar-logo-link {
  display: flex;
  flex-direction: row;        /* <-- obligatoire pour avoir côte à côte */
  align-items: center;
  justify-content: center;    /* centre le bloc dans son parent si parent centré */
  gap: 14px;                  /* espace entre logo et nom */
  width: 100%;                /* prend toute la largeur pour centrer */
  text-decoration: none;
  background: none;
}

.topbar-logo {
  height: 100px;
  width: 100px;
  display: block;
}

.topbar-title {
  font-family: 'Pacifico', cursive, sans-serif !important;
  font-size: 2em;
  font-weight: 900;
  letter-spacing: 1px;
  color: #6366F1;
  display: block;
  line-height: 1.1;
  margin: 0;
}
body.dark-mode .topbar-title {
  color: #7ba7ff;
}

.trade-history {
  width: 100%;
  margin-top: 20px;
  display: none;       /* caché tant qu’aucune donnée */
}
#trade-history-table {
  width: 100%;
  border-collapse: collapse;
}
#trade-history-table th,
#trade-history-table td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: center;
}
#trade-history-table tbody tr:nth-child(odd) {
  background: #f9f9f9;
}

.trade-header.mode-futures {
  background: #a847f3 !important;
  color: #fff !important;
}
.trade-header.mode-futures:hover {
  background: #dfc3fa !important;
  color: #333 !important;
}


/* ✅ AJOUTE ÇA dans ton CSS */

.trades-toggle {
  font-weight: normal !important;
  user-select: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid #666;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #888;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #a847f3;
  border-color: #a847f3;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
  background-color: #fff;
}

/* ===============================================
   HERO SECTION - Dashboard moderne et attractif
   =============================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 60px 40px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.05)"><polygon points="0,100 100,0 200,50 300,0 400,30 500,0 600,20 700,0 800,40 900,0 1000,30 1000,100"/></svg>') repeat-x;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin: 0 0 40px 0;
    opacity: 0.95;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 280px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.hero-btn.primary {
    background: rgba(255,255,255,0.95);
    color: #667eea;
}

.hero-btn.primary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.hero-btn.secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.hero-btn.secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.5);
}

.hero-btn .btn-icon {
    font-size: 1.5em;
}

.hero-btn .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-btn .btn-text strong {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.hero-btn .btn-text small {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Hero Stats Cards */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-stat-card .stat-icon {
    font-size: 2.5em;
    opacity: 0.9;
}

.hero-stat-card .stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-stat-card .stat-value {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 5px;
}

.hero-stat-card .stat-label {
    font-size: 0.9em;
    opacity: 0.8;
    font-weight: 300;
}

/* Responsive pour Hero Section */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        min-width: 250px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================= */
/* STYLES TAKE PROFIT - identiques au SL */
/* À ajouter dans styles.css */
/* ========================================= */

.tp-options {
    padding: 10px; 
    display: flex; 
    flex-direction: column;
    gap: 10px;
}

.tp-options label {
    font-weight: bold;
}

.tp-types {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* écartement généreux identique au SL */
    justify-content: center; /* parfaitement centré */
    align-items: center;
    margin-bottom: 15px; /* un peu d'espace en dessous pour l'esthétique */
}

.tp-types label {
    font-weight: bold;
    white-space: nowrap; /* évite les retours à la ligne internes */
}

.tp-settings-block {
    margin-left: 20px;
    padding: 10px;
    background-color: rgba(99,102,241,0.1);
    border-radius: 8px;
    border: 1px solid rgba(99,102,241,0.3);
}

.tp-settings-block input {
    width: 100%; 
    padding: 6px 10px;
    border-radius: 6px; 
    border: 1px solid #ccc;
    margin-top: 5px; 
    box-sizing: border-box;
}

/* Styles spécifiques pour les settings grids dans TP */
.tp-settings-block .settings-columns-grid {
    margin-bottom: 0;
}

.tp-settings-block .settings-column {
    gap: 8px;
}

.tp-settings-block .settings-column label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin: 0;
}

.tp-settings-block input[type="number"] {
    width: 80px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    text-align: right;
    margin-right: 0;
}

/* Supprime le titre "Paramètres généraux" dans les blocs TP */
.tp-settings-block .settings-column:first-child::before {
    content: none !important;
    display: none !important;
}