:root {
  /* Couleurs principales */
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --warning: #f59e0b;

  /* Couleurs neutres */
  --bg-main: #f8fafc;
  --bg-secondary: #f1f5f9;
  --card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Layout */
  --max-width: 1200px;
  --gap: 20px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Ombres */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode variables */
body.dark {
  --bg-main: #0f172a;
  --bg-secondary: #1e293b;
  --card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-light: #1e293b;
}

/* ================================
   Reset & Base
   ================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================
   Layout de base
   ================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

/* ================================
   Header / Navigation
   ================================ */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 20px;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
  position: relative;
  z-index: 1001;
}

.brand:hover {
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.site-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.site-nav a.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

/* Bouton hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 1001;
  transition: var(--transition-fast);
}

.nav-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition-fast);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Responsive navigation */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card);
    padding: 80px 20px 20px;
    box-shadow: var(--shadow-xl);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
  }

  .site-nav.active {
    right: 0;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .site-nav li {
    width: 100%;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    text-align: left;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .brand {
    font-size: 1.1rem;
  }
}

/* ================================
   Hero Section
   ================================ */
.hero {
  padding: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.hero .container {
  padding: 80px 28px 60px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  animation: subtle-move 20s ease-in-out infinite;
}

@keyframes subtle-move {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, 10px); }
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 20px;
  color: white;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero .lead {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero .container {
    padding: 60px 20px 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .lead {
    font-size: 1rem;
  }
}/* ================================
   Boutons
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: white;
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--bg-main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
  box-shadow: none;
}

.btn-outline:hover {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

/* ================================
   KPI Section
   ================================ */
.kpi-overview {
  margin: 60px auto;
}

.kpi-overview h2 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 32px;
  font-size: 2rem;
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.kpi-card:hover::before {
  transform: scaleX(1);
}

.kpi-value {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1;
}

.kpi-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
}

.small {
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
  }

  .kpi-card {
    padding: 20px 16px;
  }

  .kpi-value {
    font-size: 1.75rem;
  }
}

/* ================================
   Sections génériques
   ================================ */
.how-it-works,
.latest,
.about-snapshot {
  margin: 80px auto;
}

.how-it-works h2,
.latest h2,
.about-snapshot h2 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 48px;
  font-size: 2rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 16px;
}

.how-it-works h2::after,
.latest h2::after,
.about-snapshot h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.step::before {
  content: attr(data-step);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.step h3 {
  color: var(--text-primary);
  margin: 20px 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
}

.step p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-snapshot p {
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 16px;
  text-align: center;
}

.about-snapshot a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.about-snapshot a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .how-it-works,
  .latest,
  .about-snapshot {
    margin: 60px auto;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ================================
   Tables
   ================================ */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table thead {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.table th,
.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.table td {
  color: var(--text-primary);
}

.table tbody tr {
  transition: var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--bg-secondary);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.trades-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 768px) {
  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 12px 8px;
  }
}

/* ================================
   Footer
   ================================ */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 80px;
  transition: var(--transition);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-left p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer-links {
    gap: 16px;
  }
}

/* ================================
   Dashboard Elements
   ================================ */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.chart-card:hover {
  box-shadow: var(--shadow-lg);
}

.chart-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.chart-card canvas {
  max-height: 300px;
}

.market-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0;
}

.market-ticker {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 140px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.market-ticker:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Trades Section Layout */
.trades-section {
  margin: 60px auto;
}

.trades-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

.closed-trades-column,
.open-trades-column {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.closed-trades-column h2,
.open-trades-column h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.trade-table.compact {
  font-size: 0.9rem;
}

.trade-table.compact th,
.trade-table.compact td {
  padding: 10px 8px;
}

.latest-trades,
.open-trades {
  margin: 60px auto;
}

.trades-button-wrapper {
  text-align: center;
  margin-top: 24px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.85rem;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sm:hover {
  background: var(--primary-dark);
}

.pnl-positive {
  color: var(--success);
  font-weight: 600;
}

.pnl-negative {
  color: var(--danger);
  font-weight: 600;
}

.trade-buy {
  color: var(--success);
  font-weight: 600;
}

.trade-sell {
  color: var(--danger);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .trades-layout {
    grid-template-columns: 1fr;
  }

  .closed-trades-column {
    order: 2;
  }

  .open-trades-column {
    order: 1;
  }
}

@media (max-width: 768px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }

  .market-row {
    gap: 12px;
  }

  .market-ticker {
    min-width: 120px;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .closed-trades-column,
  .open-trades-column {
    padding: 16px;
  }
}/* ================================
   Grilles responsives (1 à 4 colonnes)
   ================================ */
.news-grid {
  display:grid;
  gap:20px;
  margin:20px 0;
}
.news-grid-1 { grid-template-columns:1fr; }
.news-grid-2 { grid-template-columns:repeat(2,1fr); }
.news-grid-3 { grid-template-columns:repeat(3,1fr); }
.news-grid-4 { grid-template-columns:repeat(4,1fr); }
@media (max-width:700px) {
  .news-grid-1, .news-grid-2, .news-grid-3, .news-grid-4 { grid-template-columns:1fr; }
}

/* ================================
   Style commun des cartes
   ================================ */
.news-card {
  background:#fff;
  border:1px solid #e6e9ec;
  border-radius:10px;
  padding:16px;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
  transition:background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover {
  transform:translateY(-3px);
  box-shadow:0 4px 12px rgba(0,0,0,0.1);
}
.news-card h3 { margin-top:0; font-size:1.1rem; color:var(--accent); }
.news-card p { font-size:1rem; color:#333; line-height:1.4; }
.news-card a {
  display:inline-block;
  margin-top:10px;
  text-decoration:none;
  font-weight:600;
  color:var(--accent);
}
.news-card a:hover { text-decoration:underline; }

/* Variantes de couleurs */
.news-card.green h3, .news-card.green a { color:#2b8a3e; }
.news-card.blue h3, .news-card.blue a { color:#1e6bb8; }
.news-card.gray h3, .news-card.gray a { color:#555; }

/* ================================
   Dark Mode global
   ================================ */
body.dark {
  background:#121212;
  color:#e0e0e0;
}

/* Header */
body.dark .site-header { background:#1c1c1c; border-bottom:1px solid #333; }
body.dark .brand { color:#66c2ff; }
body.dark .site-nav a { color:#e0e0e0; }
body.dark .site-nav a:hover { color:#ffcc66; }

/* Boutons */
body.dark .btn { background:#2b8a3e; color:#fff; }
body.dark .btn-outline { border:1px solid #66c2ff; color:#66c2ff; }
body.dark .btn-outline:hover { background:#66c2ff; color:#121212; }

/* Market tickers */
body.dark .market-row { background:#1c1c1c; border:1px solid #333; }
body.dark .market-ticker { color:#e0e0e0; }

/* News cards */
body.dark .news-card {
  background:#1c1c1c;
  border:1px solid #333;
  color:#e0e0e0;
}
body.dark .news-card h3 { color:#66c2ff; }
body.dark .news-card p { color:#e0e0e0; }
body.dark .news-card a { color:#66c2ff; }
body.dark .news-card a:hover { color:#ffcc66; }

/* Footer */
body.dark .site-footer { background:#1c1c1c; border-top:1px solid #333; }
body.dark .footer-left { color:#ccc; }
body.dark .footer-links a { color:#66c2ff; }
body.dark .footer-links a:hover { color:#ffcc66; }

.kpi-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.kpi-positive { color: #2b8a3e; } /* vert */
.kpi-negative { color: #c0392b; } /* rouge */

.market-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap; /* permet retour à la ligne */
}
.market-ticker {
  flex: 1 1 auto;
  min-width: 140px; /* largeur mini pour lisibilité */
  text-align: center;
}
body.dark .market-ticker {
  background: #1c1c1c;
  border: 1px solid #333;
  color: #e0e0e0;
}
body.dark .kpi-positive { color: #2ecc71; }
body.dark .kpi-negative { color: #e74c3c; }

.dashboard-row {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap; /* permet retour à la ligne sur mobile */
}

.chart-card {
  flex: 1 1 45%;        /* chaque card prend ~45% */
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.chart-card canvas {
  width: 100% !important;
  height: 250px !important; /* réduit la hauteur */
}
.kpi-positive { color: #2b8a3e; font-weight: 700; }
.kpi-negative { color: #c0392b; font-weight: 700; }

.trade-buy {
  color: #2b8a3e;   /* vert */
  font-weight: 700;
  margin-left: 6px;
}

.trade-sell {
  color: #c0392b;   /* rouge */
  font-weight: 700;
  margin-left: 6px;
}
.trade-buy {
  color: #2b8a3e;   /* vert */
  font-weight: 700;
  margin-left: 6px;
}

.trade-sell {
  color: #c0392b;   /* rouge */
  font-weight: 700;
  margin-left: 6px;
}

.trades-button-wrapper {
  margin-top: 12px;
  text-align: right;
}

.trades-button-wrapper .btn {
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.trades-button-wrapper .btn:hover {
  background: #1e6bb8;
}

.trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.trade-card {
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.trade-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.trade-details p {
  margin: 4px 0;
  font-size: 0.9rem;
}

.trade-card footer {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #666;
}

.notes {
  background: #f9f9f9;
  padding: 6px;
  border-left: 3px solid var(--accent);
  font-style: italic;
}
.trade-details p { margin: 4px 0; font-size: 0.9rem; }
.notes {
  background: #f9f9f9;
  padding: 6px;
  border-left: 3px solid var(--accent);
  font-style: italic;
}
footer a { font-size: 0.85rem; color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.btn-detail {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-detail:hover {
  background: #1e6bb8;
}
.trade-image {
  margin-top: 15px;
  text-align: center;
}
.trade-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.kpi-ticker {
  overflow: hidden;
  background: #111;
  color: #fff;
  padding: 8px 0;
  border-bottom: 2px solid #333;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-scroll 20s linear infinite;
}

.ticker-track span {
  margin: 0 40px;
  font-size: 0.95rem;
  font-weight: 600;
}

.kpi-positive { color: #2b8a3e; }
.kpi-negative { color: #c0392b; }

@keyframes ticker-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.trade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem; /* même taille pour tous */
  font-weight: 700;
  margin-bottom: 10px;
}

.trade-symbol {
  flex: 1;
  text-align: left;
}

.trade-side {
  flex: 1;
  text-align: center;
}

.trade-pnl {
  flex: 1;
  text-align: right;
}
.filter-card {
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  max-width: 320px; /* largeur fixe pour card */
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filters-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.filters-form input,
.filters-form select,
.filters-form button {
  padding: 6px 10px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.filters-form button {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.filters-form button:hover {
  background: #1e6bb8;
}

.filter-card {
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filters-form {
  display: flex;
  flex-wrap: wrap; /* permet retour à la ligne si trop long */
  align-items: center;
  gap: 12px;
  width: 100%;
}

.filters-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.filters-form input,
.filters-form select,
.filters-form button {
  padding: 6px 10px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.filters-form button {
  background: var(--accent, #007bff);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.filters-form button:hover {
  background: #0056b3;
}
.form-card {
  max-width: 1400px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.form-card h1 {
  margin-top: 0;
  color: var(--accent, #2c7a7b);
  font-size: 1.6em;
  text-align: center;
}

.success-message {
  text-align: center;
  color: green;
  font-weight: 600;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.form-actions {
  text-align: center;
  margin-top: 20px;
}

.btn-primary {
  background: var(--accent, #4caf50);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary:hover {
  background: #388e3c;
}

.btn-secondary {
  background: #607d8b;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 10px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #455a64;
}

.analyses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.analysis-card {
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.analysis-header {
  background: var(--accent, #2c7a7b);
  color: #fff;
  padding: 10px;
  text-align: center;
}

.analysis-header h2 {
  margin: 0;
  font-size: 1.1em;
}

.analysis-image img {
  width: 100%;
  height: auto;
  display: block;
}

.analysis-content {
  padding: 10px;
  flex-grow: 1;
}

.analysis-footer {
  padding: 10px;
  border-top: 1px solid #eee;
  font-size: 0.85em;
}

.btn-detail {
  display: inline-block;
  margin-top: 5px;
  padding: 6px 12px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85em;
}

.btn-detail:hover {
  background: #0056b3;
}

.main-nav ul li a {
  padding: 8px 12px;
  display: inline-block;
  text-decoration: none;
  color: #333;
}

.main-nav ul li a:hover {
  background: var(--accent, #2c7a7b);
  color: #fff;
  border-radius: 6px;
}
.sidebar-nav ul {
  list-style: none;       /* supprime les puces */
  padding: 0;
  margin: 0;
}

.sidebar-nav ul li {
  margin: 8px 0;
}

.sidebar-nav ul li a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
  background: var(--accent, #2c7a7b);
  color: #fff;
}
.sidebar-nav ul {
  list-style-type: none !important;
}

/* Neutraliser les puces et marges */
.site-header .main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;              /* aligne les <li> horizontalement */
  flex-direction: row;        /* orientation horizontale */
  gap: 20px;                  /* espace entre les items */
}

/* Chaque item */
.site-header .main-nav ul li {
  margin: 0;                  /* supprime marges verticales */
}

/* Liens stylisés */
.site-header .main-nav ul li a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

/* Hover et actif */
.site-header .main-nav ul li a:hover,
.site-header .main-nav ul li a.active {
  background: var(--accent, #2c7a7b);
  color: #fff;
}
/* Neutraliser les puces et marges */
.site-header .main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;              /* aligne les <li> horizontalement */
  flex-direction: row;        /* orientation horizontale */
  gap: 20px;                  /* espace entre les items */
}

/* Chaque item */
.site-header .main-nav ul li {
  margin: 0;                  /* supprime marges verticales */
}

/* Liens stylisés */
.site-header .main-nav ul li a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

/* Hover et actif */
.site-header .main-nav ul li a:hover,
.site-header .main-nav ul li a.active {
  background: var(--accent, #2c7a7b);
  color: #fff;
}

/* Conteneur horizontal du menu */
.site-header .main-nav ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex !important;       /* force le flex */
  flex-direction: row !important; /* force horizontal */
  flex-wrap: nowrap;              /* une seule ligne */
  gap: 16px;
  align-items: center;
}

/* Neutraliser les héritages gênants sur les <li> */
.site-header .main-nav ul.menu > li {
  display: inline-flex !important; /* permet le contenu inline mais flex */
  align-items: center;
  flex: 0 0 auto !important;       /* empêche 100% largeur */
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Neutraliser les héritages gênants sur les <a> */
.site-header .main-nav ul.menu > li > a {
  display: inline-block !important; /* pas block plein largeur */
  width: auto !important;
  white-space: nowrap;              /* évite retour à la ligne interne */
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

/* Hover / actif */
.site-header .main-nav ul.menu > li > a:hover,
.site-header .main-nav ul.menu > li > a.active {
  background: var(--accent, #2c7a7b);
  color: #fff;
}

/* Style uniforme pour les liens du menu */
.site-header .main-nav ul.menu > li > a {
  display: inline-flex;        /* permet d’aligner texte + icône */
  align-items: center;         /* aligne verticalement */
  gap: 6px;                    /* espace entre icône et texte */
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

/* Icônes et texte toujours alignés */
.site-header .main-nav ul.menu > li > a .icon {
  display: inline-block;
  width: 1.2em;                /* réserve un espace fixe */
  text-align: center;
}

/* Hover / actif */
.site-header .main-nav ul.menu > li > a:hover,
.site-header .main-nav ul.menu > li > a.active {
  background: var(--accent, #2c7a7b);
  color: #fff;
}

.analysis-detail-card {
  max-width: 800px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.analysis-detail-card h1 {
  margin-top: 0;
  font-size: 1.4em;
  color: var(--accent, #2c7a7b);
  text-align: center;
}

.analysis-date {
  text-align: center;
  font-size: 0.9em;
  color: #666;
}

.analysis-description {
  margin: 20px 0;
  line-height: 1.5;
}

.analysis-levels p {
  margin: 5px 0;
  font-weight: 600;
}

.analysis-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.analysis-images img {
  max-width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analysis-detail-card {
  max-width: 800px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.analysis-detail-card h1 {
  margin-top: 0;
  font-size: 1.4em;
  color: var(--accent, #2c7a7b);
  text-align: center;
}

.analysis-date {
  text-align: center;
  font-size: 0.9em;
  color: #666;
}

.analysis-description {
  margin: 20px 0;
  line-height: 1.5;
}

.analysis-levels p {
  margin: 5px 0;
  font-weight: 600;
}

.analysis-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.analysis-images img {
  max-width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pnl-positive { color: #2b8a3e; font-weight: 600; }
.pnl-negative { color: #b00020; font-weight: 600; }
.badge-manual { font-size: 0.7em; color: #666; margin-left: 4px; }
.trade-table th { background: #f5f5f5; font-weight: 600; }
.trade-table td { text-align: center; }

.chart-card {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.trade-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.trade-table th,
.trade-table td {
  padding: 8px;
  text-align: center;
  border: 1px solid #e6e9ec;
  word-wrap: break-word;
}
