:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --card: #11161b;
  --muted: #9fb3c8;
  --text: #e5e7eb;
  --accent: #4f46e5;
  --accent-2: #22c55e;
  --border: #1f2937;
  --header-bg: rgba(13,16,22,0.8);
  --input-bg: #0f131b;
  --link-color: #7aa2ff;
  --badge-deposit_fiat: #124b2f;
  --badge-deposit_crypto: #124b2f;
  --badge-withdraw_crypto: #7f1d1d;
  --badge-withdraw_fiat: red;
  --badge-staking_reward: deepskyblue;
  --badge-interest: gold;
  --badge-trade: darkblue;
  --badge-remove_liquidity: pink;
  --badge-add_liquidity: pink;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --card: #ffffff;
  --muted: #64748b;
  --text: #1e293b;
  --accent: #4f46e5;
  --accent-2: #22c55e;
  --border: #e2e8f0;
  --header-bg: rgba(255,255,255,0.8);
  --input-bg: #f1f5f9;
  --link-color: #3b82f6;
  --badge-deposit_fiat: green;
  --badge-deposit_crypto: green;
  --badge-withdraw_crypto: red;
  --badge-withdraw_fiat: red;
  --badge-staking_reward: deepskyblue;
  --badge-interest: gold;
  --badge-trade: blue;
  --badge-remove_liquidity: pink;
  --badge-add_liquidity: pink;
}

/* Par défaut, utiliser le thème sombre */
:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --card: #11161b;
  --muted: #9fb3c8;
  --text: #e5e7eb;
  --accent: #4f46e5;
  --accent-2: #22c55e;
  --border: #1f2937;
  --header-bg: rgba(13,16,22,0.8);
  --input-bg: #0f131b;
  --link-color: #7aa2ff;
  --badge-deposit_fiat: #124b2f;
  --badge-deposit_crypto: #124b2f;
  --badge-withdraw_crypto: #7f1d1d;
  --badge-withdraw_fiat: red;
  --badge-staking_reward: deepskyblue;
  --badge-interest: gold;
  --badge-trade: darkblue;
  --badge-remove_liquidity: pink;
  --badge-add_liquidity: pink;
}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Helvetica Neue,Arial,Noto Sans;
  padding:24px
}
a{color:var(--link-color);text-decoration:none}
a:hover{text-decoration:underline}
.site-header{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:12px 20px; border-bottom:1px solid var(--border);
  background:var(--header-bg); backdrop-filter: blur(8px);
}
.brand img{ height:50px; }
.brand .title{font-weight:700; letter-spacing:.3px}
.site-nav{display:flex; gap:8px; flex-wrap:wrap}
.nav-item{
  display:inline-flex; align-items:center; gap:6px; padding:8px 10px;
  border:1px solid var(--border); border-radius:8px; background:var(--card);
}
.nav-item.active{border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset}
.nav-item .emoji{font-size:16px}
.site-main{max-width: 100%; margin:20px auto; padding:0 16px}
.card{background:var(--card); border:1px solid var(--border); border-radius:12px; padding:20px;margin:0 auto}
table{width:100%;border-collapse:collapse;margin-top:8px;}
.table th,.table td{padding:10px; border-bottom:1px solid var(--border); text-align:left; font-size:14px}
.table th{color:var(--muted); font-weight:600}
.table .addr{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace}
td img {
  max-height: 25px;
  vertical-align: middle;
  background: #FFF;
  border-radius: 20px;
  padding: 2px;
  margin-right: 3px;
}.grid{display:grid; gap:16px}
.grid.cols-2{grid-template-columns:1fr 1fr}
.grid.cols-3{grid-template-columns:repeat(3, 1fr)}
.notice{padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:rgba(0,0,0,0.1)}
.notice.ok{border-color:var(--accent-2); background:rgba(34,197,94,0.1)}
.muted{color:var(--muted)}
.site-footer{color:var(--muted); padding:20px; border-top:1px solid var(--border); text-align:center; margin-top:40px}
button,.btn{
  background:var(--card); color:var(--text); border:1px solid var(--border);
  padding:8px 12px; border-radius:8px; cursor:pointer
}
button:hover,.btn:hover{border-color:var(--accent)}
.btn{padding:8px 12px;border-radius:8px;border:1px solid var(--border);background:var(--card);color:var(--text);text-decoration:none}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #bd2130;
}

.btn-danger a:hover {
  text-decoration: none;
}

input,select{
  background:var(--input-bg); color:var(--text); border:1px solid var(--border); border-radius:8px; padding:8px;
}
h1{margin:0 0 12px;font-size:20px}
h2 img { vertical-align: middle; max-height: 70px; margin-right:10px;
  background: #FFF;
  border-radius: 40px;
  padding: 5px;
 }

.badge{display:inline-block;padding:2px 8px;border-radius:999px;border:1px solid var(--border);background:var(--card);font-size:12px}


.deposit_fiat { background: var(--badge-deposit_fiat); }
.deposit_crypto { background: var(--badge-deposit_crypto); }
.withdraw_crypto { background: var(--badge-withdraw_crypto); }
.withdraw_fiat { background: var(--badge-withdraw_fiat); }
.staking_reward { background: var(--badge-staking_reward); }
.trade { background: var(--badge-trade); color:#FFF; }
.add_liquidity { background: var(--badge-add_liquidity); }
.remove_liquidity { background: var(--badge-remove_liquidity); }
.interest { background: var(--badge-interest); }

.pager{margin-top:12px;display:flex;gap:8px}

.bar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.meta{color:var(--muted);font-size:13px}

/* Styles pour le menu déroulant */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--card);
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.dropdown-content a {
  color: var(--text);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: rgba(0,0,0,0.1);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Styles pour le sélecteur de thème */
.theme-switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.theme-switch:hover {
  border-color: var(--accent);
}

/* Style du sélecteur de thème */
.theme-switch {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 16px;
}

.theme-switch-icon {
  font-size: 16px;
  margin-right: 6px;
}

/* Style pour l'en-tête de tableau fixe */
.transaction-table {
  position: relative;
}

.transaction-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: var(--card);
}

/* Optionnel : ajouter une ombre pour améliorer la visibilité */
.transaction-table thead::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--border);
}

.btn-danger:hover {
  text-decoration: none;
  border-color: #FFF;
}