/* style.css */


/* ---------- Wallet card ---------- */
.wallet-card{background:#fff;border-radius:8px;padding:1.5rem;box-shadow:0 2px 6px rgba(0,0,0,.06)}
.wallet-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem 1.5rem}
.wallet-total .label,
.wallet-item  .label{font-size:.80rem;color:#666}
.wallet-total .value.big{font-weight:700;font-size:1.8rem}
.wallet-item  .value{font-weight:600;font-size:1.15rem}
.wallet-total .ccy{margin-left:.25rem;font-size:1rem;color:#555}
.value.pnl{transition:color .3s}

/* ---------- Progress bar ---------- */
.wallet-bar{margin-top:1rem;height:8px;background:#e9ecef;border-radius:4px;overflow:hidden}
.bar-cash   {background:#17a2b8;height:100%;width:50%}
.bar-invest {background:#6f42c1;height:100%;width:50%}

/* Reset rapide */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Market data */
#fear-greed-card {
    min-width: 120px;
    max-width: 180px;
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-right: 2vw;
    background: none;
    border-radius: 18px;
    box-shadow: none;
}

.fg-gauge-box {
    padding: 0.7em 0 0.2em 0;
    border-radius: 1.1em;
    background: none;
    /* Option: add white background for card effect: background: #fff; box-shadow: 0 1px 6px 0 rgba(34,41,47,0.06); */
}
.fg-gauge-header {
    font-weight: 600;
    font-size: 1.07em;
    margin-bottom: 0.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2em;
}
.fg-gauge-svg-wrap {
    margin-bottom: 0.15em;
}
.fg-gauge-update {
    font-size: 0.89em;
    color: #b1b3b9;
    margin-top: 0.33em;
    letter-spacing: 0.01em;
}


/* Paire banie auto completion*/
#banPairSuggestions .pair-row:hover {
  background-color: #f0f0f0;
}
#banPairSuggestions {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Portal user tableau des ordres */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.orders-table {
  min-width: 650px; /* ou 700px selon la densité */
  width: 100%;
}

.table-wrapper::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 100%;
  background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
}



/* Corps de page */
body {
  font-family: Arial, sans-serif;
  background-color: #f5f6f8;
  color: #333;
}

/* En-tête (header) */
header {
  background-color: #2c3e50;
  padding: 1rem;
  position: relative;
}
header h1, header h2, header a {
  color: #fff;
  text-decoration: none;
}
header h1 {
  font-size: 1.5rem;
}

/* Barre de navigation */
nav {
  margin: 0.5rem 0;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
}
nav ul li a:hover {
  background-color: #34495e;
  border-radius: 4px;
}

/* Contenu principal */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Sections */
section {
  margin-bottom: 2rem;
  background: #fff;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
section h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* Boutons */
.button,
input[type="submit"] {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #2980b9;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  margin: 0.5rem 0.5rem 0.5rem 0;
  border: none;
  cursor: pointer;
}
.button:hover,
input[type="submit"]:hover {
  background-color: #3498db;
}

/* Tableaux */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
th, td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}
th {
  background-color: #ecf0f1;
}

/* Formulaires */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
label {
  font-weight: bold;
}
input[type="text"],
input[type="email"],
input[type="password"] {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #2c3e50;
  color: #fff;
  position: fixed;
  bottom: 0;
  width: 100%;
}

/* Infobulles personnalisées */
.tooltip {
  position: relative;
  cursor: help;
  text-decoration: dotted underline;
}

.tooltip .tooltiptext {
  visibility: hidden;
  background-color: #2c3e50;
  color: #fff;
  text-align: left;
  padding: 0.5rem;
  border-radius: 5px;
  font-size: 0.85rem;
  position: absolute;
  z-index: 10;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: normal;

  /* Ajouts pour stabilité */
  display: inline-block;
  min-width: 160px;
  max-width: 300px;
  box-sizing: border-box;
  word-wrap: break-word;
}


.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.logout-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.logout {
  background-color: #c0392b;
  font-weight: bold;
}

.logout:hover {
  background-color: #e74c3c;
}
.subscription-status {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  font-weight: bold;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.subscription-active {
  background-color: #2ecc71; /* Vert */
  color: white;
}

.subscription-inactive {
  background-color: #f1c40f; /* Jaune */
  color: #333;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  min-width: 300px;
  max-width: 600px;
  width: fit-content;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  text-align: center;
}

.modal-content input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  margin: 1rem 0;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.modal-actions {
  display: flex;
  justify-content: space-around;
}

.button.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.button.disabled {
  background-color: #bdc3c7; /* gris clair */
  color: #fff;
  cursor: not-allowed;
  pointer-events: none;
}

.status-indicator {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 20px;
  text-align: center;
  min-width: 80px;
}

.status-active {
  background-color: #2ecc71; /* Vert */
  color: white;
}

.status-inactive {
  background-color: #bdc3c7; /* Gris */
  color: #333;
}

.status-error {
  background-color: #e74c3c; /* Rouge */
  color: white;
}

/* Amélioration du contenu du modal */
#previewContent ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

#previewContent li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
  gap: 1rem;
}

#previewContent li strong {
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

#previewContent li .status {
  text-align: right;
  white-space: nowrap;
}

#previewContent .status span {
  margin-left: 0.3rem;
}

.intro {
  text-align: center;
  line-height: 1.8;
  font-size: 1.05rem;
  padding: 1rem 2rem;
}

.intro p {
  margin-bottom: 1.2rem;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  max-width: 600px;
}

.form-group label {
  width: 180px;
  text-align: right;
}

.form-group input,
.form-group textarea {
  flex: 1;
}

td span[title="En attente de validation"] {
  font-size: 1.2rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}



.logout-container .user-info {
  color: #ecf0f1;
  font-weight: bold;
  margin-right: 1rem;
  display: inline-block;
  vertical-align: middle;
}

.suggestion-icon-container {
  position: absolute;
  top: 1.2rem;
  right: 9rem;
}

.suggestion-wrapper {
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.suggestion-icon {
  font-size: 1.3rem;
  text-decoration: none;
  color: #ecf0f1;
  transition: transform 0.2s ease;
}

.suggestion-icon:hover {
  transform: scale(1.2);
  color: #ffffff;
}

/* Dropdown menu admin */
nav ul li.dropdown {
  position: relative;
}

nav ul li.dropdown .dropdown-content {
  display: none;
  position: absolute;
  background-color: #34495e;
  min-width: 180px;
  z-index: 10;
  top: 100%;
  left: 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

nav ul li.dropdown .dropdown-content li {
  padding: 0;
}

nav ul li.dropdown .dropdown-content a {
  min-width: 220px;
  display: block;
  padding: 0.5rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: normal;
  white-space: nowrap;

}

nav ul li.dropdown .dropdown-content a:hover {
  background-color: #3e556e;
}

nav ul li.dropdown:hover .dropdown-content {
  display: block;
}

.features-list {
  margin: 2rem auto;
  max-width: 450px;
  padding: 1rem 1.5rem;
  background-color: #f0f7f4;
  border-left: 4px solid #2ecc71;
  border-radius: 8px;
  text-align: left;
  font-size: 1rem;
}

.features-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.features-list li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.features-list .check {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.save-button-top-right {
  float: right;
  margin-top: -2.5rem;
  margin-bottom: 1rem;
  background-color: #2980b9;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.save-button-top-right:hover {
  background-color: #3498db;
}

.pair-row {
  transition: background-color 0.2s ease;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  background-color: #fff;
}

.pair-row:hover {
  background-color: #e0f7fa;
}

.pair-row.selected {
  background-color: #e0f7fa;
  font-weight: bold;
}

.badge-mode {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  vertical-align: middle;
  text-transform: uppercase;
}

.badge-simulation {
  background-color: #3498db;
  color: white;
}

.badge-reel {
  background-color: #e74c3c;
  color: white;
}
.icon-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem;
  color: inherit;
}

.icon-button:hover {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}



.badge-mode {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;
}

.badge-real {
  background-color: #27ae60;
}

.badge-simulation {
  background-color: #f39c12;
}

.badge-active {
  background-color: #2980b9;
}
/* ############################  USER PORTAL GAIN/LOSS % ################################### */

.gain-positive {
  color: #28a745; /* vert bootstrap */
  font-weight: bold;
}

.gain-negative {
  color: #dc3545; /* rouge bootstrap */
  font-weight: bold;
}

.flash-green {
  background-color: #d4edda !important;
  transition: background-color 0.3s ease;
}

.flash-red {
  background-color: #f8d7da !important;
  transition: background-color 0.3s ease;
}



/* ########################################## /wallet ################################### */

.wallet-active .wallet-card {
  padding-top: 3.2rem !important;  /* Laisse de la place pour le bandeau */
  background-color: #f0f8ff !important;
  border: 2px solid #2980b9;
  box-shadow: 0 0 10px rgba(41, 128, 185, 0.3);
}


.wallet-card {
  padding: 1.5rem !important;
  padding-top: 1.5rem !important;  /* Retirer le 3rem global ici */
  gap: 1.2rem !important;
}


.wallet-card h3 {
  margin-bottom: 0.6rem !important;  /* espace titre */
}

.wallet-card ul {
  line-height: 1.6 !important;       /* réduit l’espace vertical des infos */
  font-size: 0.95rem !important;     /* taille de police légèrement réduite */
}

.wallet-active-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #dff0d8;
  color: #3c763d;
  text-align: center;
  padding: 0.4rem 0.6rem;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  font-weight: bold;
  font-size: 0.95rem;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05);
}

.wallet-value {
  position: absolute;
  top: 3.2rem; /* décale en dessous du bandeau actif */
  right: 2rem;
  text-align: right;
  z-index: 2; /* s’assure que c’est au-dessus du contenu normal */
}

.wallet-inactive .wallet-card {
  border: 1px solid #ddd !important;
  background-color: #ffffff !important;
  position: relative;
}

.wallet-content-inactive {
  filter: grayscale(20%) brightness(0.95);
  opacity: 0.85;
}

.wallet-inactive-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.6rem;
  background-color: #f9c74f;
  color: #5c4400;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.75rem;
  z-index: 3;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}




.status-error {
  background-color: #f8d7da;  /* rose clair */
  color: #721c24;             /* rouge foncé pour le texte */
  border: 1px solid #f5c6cb;  /* pour le contraste */
}

.status-active {
  background-color: #d4edda;  /* vert clair */
  color: #155724;             /* vert foncé lisible */
  border: 1px solid #c3e6cb;
}

.mode-toggle-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.mode-option {
  background-color: #ecf0f1;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 1rem;
  flex: 1 1 300px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.mode-option input[type="radio"] {
  display: none;
}

.mode-option:hover {
  border-color: #2980b9;
  background-color: #eaf3f9;
}

.mode-option.selected {
  border-color: #2980b9;
  background-color: #d6eaf8;
}

.param-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
  max-width: 700px;
}

.param-group label {
  flex: 0 0 220px;
  font-weight: 600;
  line-height: 1.6;
}

.param-group input[type="text"],
.param-group input[type="number"],
.param-group select {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 160px;
}

.param-description {
  margin-left: 220px;
  font-size: 0.9rem;
  color: #666;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.session-banner {
  background-color: #e6f9f0;
  color: #155724;
  padding: 1rem 1.5rem;
  border-left: 6px solid #27ae60;
  border-radius: 6px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

form .button {
  margin-top: 2rem;
}
.param-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #2980b9;
  margin-top: 4px;
}

