/* Trade — backend noir & blanc (remplace le vert #015941) */

.user-lang-bar {
  position: fixed;
  bottom: 4.25rem;
  right: 0.75rem;
  z-index: 45;
}

.footer-lang-select-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.footer-lang-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a8a8a;
}

.footer-lang-select {
  width: 100%;
  margin: 0;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #0a0a0a;
  background-color: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
}

.footer-lang-select-wrap--compact {
  margin-top: 0;
  max-width: 9.5rem;
}

.footer-lang-select-wrap--compact .footer-lang-label {
  display: none;
}

.footer-lang-select-wrap--compact .footer-lang-select {
  padding: 0.35rem 1.75rem 0.35rem 0.5rem;
  font-size: 0.8125rem;
}

.trade-gtranslate-host,
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
  visibility: hidden !important;
}

body {
  top: 0 !important;
  position: static !important;
}

.skiptranslate {
  height: 0 !important;
  overflow: hidden !important;
}

.admin-sidebar-logo {
  width: 120px;
  max-width: 100%;
  height: auto;
  display: block;
}

:root {
  --trade-black: #0a0a0a;
  --trade-white: #ffffff;
  --trade-muted: #5c5c5c;
  --trade-border: #e8e8e8;
  --trade-accent: #c8ff00;
}

/* Remplacement des styles inline verts courants */
[style*="#015941"],
[style*="015941"] {
  color: var(--trade-black) !important;
}

[style*="background-color: #015941"],
[style*="background: linear-gradient(90deg, #015941"],
[style*="background: linear-gradient(135deg, #015941"] {
  background: var(--trade-black) !important;
  background-color: var(--trade-black) !important;
}

.bg-\[\#015941\] {
  background-color: var(--trade-black) !important;
}

.text-\[\#015941\] {
  color: var(--trade-black) !important;
}

/* Header espace client */
header.bg-white .btn-icon[id="notificationDropdown"],
header.bg-white .btn-icon[id="profileDropdown"],
header.bg-white a.btn-icon.rounded-full {
  background-color: var(--trade-black) !important;
  color: var(--trade-white) !important;
}

/* Carte bancaire dashboard */
.card[style*="015941"] {
  background: var(--trade-black) !important;
}

.card-title[style*="015941"],
h3[style*="015941"],
h2[style*="015941"],
i[style*="015941"] {
  color: var(--trade-black) !important;
}

/* Admin sidebar / primary buttons — fichier admin */
.sidebar-nav .active,
.btn-primary,
a.btn-primary {
  background-color: var(--trade-black) !important;
  border-color: var(--trade-black) !important;
}

/* Evolución del saldo — style courbe trading, sans carte */
.balance-sparkline-wrap {
  margin-top: 2rem;
  margin-bottom: 5rem;
  padding-bottom: 1.5rem;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.balance-sparkline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.balance-sparkline-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--trade-black);
}

.balance-sparkline-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--trade-muted);
}

.balance-sparkline-value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--trade-black);
  font-variant-numeric: tabular-nums;
}

.balance-sparkline-plot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: stretch;
}

.balance-sparkline-y-axis {
  position: relative;
  min-width: 3.25rem;
  min-height: 11rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--trade-muted);
  font-variant-numeric: tabular-nums;
}

.balance-sparkline-y-tick {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  line-height: 1;
}

.balance-sparkline-chart {
  width: 100%;
  min-height: 11rem;
  border-left: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.balance-sparkline {
  width: 100%;
  height: 11rem;
  min-height: 176px;
  display: block;
}

.balance-sparkline-x-axis {
  position: relative;
  margin-top: 0.35rem;
  margin-left: calc(3.25rem + 0.75rem);
  min-height: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--trade-muted);
}

.balance-sparkline-x-tick {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.balance-sparkline-x-tick.is-start {
  left: 0;
  transform: none;
}

.balance-sparkline-x-tick.is-end {
  left: auto;
  right: 0;
  transform: none;
}

@media (min-width: 768px) {
  .balance-sparkline-y-axis {
    min-width: 3.75rem;
    min-height: 13rem;
  }

  .balance-sparkline-chart,
  .balance-sparkline {
    min-height: 13rem;
    height: 13rem;
  }

  .balance-sparkline-y-axis,
  .balance-sparkline-x-axis {
    font-size: 0.75rem;
  }

  .balance-sparkline-x-axis {
    margin-left: calc(3.75rem + 0.75rem);
  }

  .balance-sparkline-wrap {
    margin-bottom: 5.5rem;
  }
}

@media (max-width: 767px) {
  .balance-sparkline-wrap {
    margin-bottom: 6.5rem;
    padding-bottom: 2rem;
  }
}

.balance-sparkline-axis {
  stroke: #bdbdbd;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.balance-sparkline-grid {
  stroke: #f0f0f0;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.balance-sparkline-area {
  fill: url(#balanceSparkFill);
  opacity: 0;
  animation: trade-sparkline-area-in 1.2s ease-out 0.8s forwards;
}

.balance-sparkline-path {
  fill: none;
  stroke: var(--trade-black);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: trade-sparkline-draw 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes trade-sparkline-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes trade-sparkline-area-in {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .balance-sparkline-path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .balance-sparkline-area {
    animation: none;
    opacity: 1;
  }
}

/* ——— Responsive (vitrine auth + espace client) ——— */

html {
  -webkit-text-size-adjust: 100%;
}

.trade-client-app {
  overflow-x: clip;
}

.trade-client-app .min-h-screen.bg-gray-50 {
  min-height: 100dvh;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

.trade-client-logo img,
.trade-client-logo {
  display: block;
  max-width: min(120px, 42vw);
  height: auto;
}

header.bg-white .container {
  width: 100%;
  max-width: 1200px;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.trade-client-app .container.mx-auto {
  width: 100%;
  max-width: 1200px;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.trade-client-app .modal-container,
.trade-client-app #progressInfo .modal-container {
  width: min(100% - 2rem, 28rem);
  max-width: calc(100vw - 2rem);
  margin-left: auto;
  margin-right: auto;
}

.trade-client-app #progressInfo .modal-body {
  padding: 1.25rem;
}

.trade-client-app .actions-desktop {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.trade-client-app .actions-desktop .btn,
.trade-client-app .actions-desktop button {
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
  text-align: center;
}

.trade-client-app table {
  min-width: 520px;
}

.trade-client-app .relative.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

#mobileMenu > div {
  width: min(16rem, 85vw);
  max-width: 85vw;
}

@media (max-width: 767px) {
  .user-lang-bar {
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
  }

  .balance-sparkline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .balance-sparkline-value {
    font-size: 1.25rem;
  }

  .balance-sparkline-y-axis {
    min-width: 2.75rem;
    font-size: 0.625rem;
  }

  .balance-sparkline-x-axis {
    margin-left: calc(2.75rem + 0.5rem);
    font-size: 0.625rem;
  }

  .trade-client-app .text-2xl {
    font-size: 1.35rem;
  }

  .trade-client-app .card-content .flex.justify-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (max-width: 380px) {
  .trade-client-app .my-8.grid.grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
