/* Trézo dans ma ville - Main CSS File (adapté d'un outil open source) */
/* Version: 1.0.0 */
/* Description: Styles de base */

/* ========================================
   GLOBAL STYLES
======================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #ffffff;
  color: #1e293b;
  line-height: 1.5;
}

/* ========================================
   HEADER STYLES
======================================== */

.header {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  padding: 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid #1e293b;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

/* Navigation Menu */
.main-nav {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.main-nav .nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.main-nav .nav-link:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
}

.language-select {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-select:hover {
  background: rgba(255,255,255,0.2);
}

.language-select option {
  background: #1e293b;
  color: white;
}

.language-select option:disabled {
  color: rgba(255,255,255,0.35);
  font-style: italic;
}

.stats-overview {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #10b981;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.disclaimer-header {
  text-align: center;
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* ========================================
   MAIN CONTAINER
======================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ========================================
   TABLE STYLES
======================================== */

.table-container {
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Desktop horizontal scrollbar */
@media (min-width: 769px) {
  .table-container {
    overflow-x: auto;
  }
  
  .table-container::-webkit-scrollbar {
    height: 12px;
  }
  
  .table-container::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 6px;
  }
  
  .table-container::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 6px;
  }
  
  .table-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #334155;
}

th {
  padding: 0.8rem 0.6rem; /* Réduit de 1rem */
  text-align: left;
  font-weight: 600;
  font-size: 0.7rem; /* Réduit de 0.875rem (20% plus petit) */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  border-bottom: 1px solid #475569;
}

/* Table column widths */
th:first-child { width: 20px; }     /* Star */
th:nth-child(2) { width: 30px; }   /* # */
th:nth-child(3) { width: 180px; }  /* Name */
th:nth-child(4) { width: 80px; }   /* Privacy */
th:nth-child(5) { width: 120px; }  /* Merchant Count */
th:nth-child(6) { width: 80px; }   /* Change 3 months */
th:nth-child(7) { width: 100px; }  /* Volume Est. */
th:nth-child(8) { width: 120px; }  /* Timeline */
th:nth-child(9) { width: 80px; }   /* CMC Rank */
th:nth-child(10) { width: 120px; } /* Market Cap */
th:nth-child(11) { width: 100px; } /* Value Score */
th:nth-child(12) { width: 140px; } /* Coin Adoption Score */

/* ========================================
   SORTABLE COLUMNS
======================================== */

.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.sortable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sort-arrow {
  margin-left: 0.5rem;
  color: #64748b;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.sortable.asc .sort-arrow {
  color: #3b82f6;
}

.sortable.desc .sort-arrow {
  color: #3b82f6;
}

.sortable.asc .sort-arrow::after {
  content: ' ↑';
}

.sortable.desc .sort-arrow::after {
  content: ' ↓';
}

/* ========================================
   TABLE BODY STYLES
======================================== */

tbody tr {
  border-bottom: 1px solid #334155;
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background: #2d3748;
}

td {
  padding: 0.8rem 0.6rem; /* Réduit de 1rem */
  vertical-align: middle;
  height: 2.4rem; /* Réduit de 3rem (20% plus petit) */
  font-size: 0.8rem; /* Ajout : 20% plus petit que la taille normale */
}

.rank {
  font-weight: 600;
  color: #94a3b8;
}

/* ========================================
   CRYPTO INFO STYLES
======================================== */

.star-column {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.star-column:hover {
  opacity: 1;
}

.star-icon {
  width: 12px; /* Réduit de 16px (25% plus petit) */
  height: 12px;
}

.crypto-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.crypto-icon {
  width: 24px; /* Réduit de 32px (25% plus petit) */
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.crypto-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crypto-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.8rem; /* Réduit de 20% */
}

.crypto-symbol {
  color: #94a3b8;
  font-size: 0.7rem; /* Réduit de 0.875rem (20% plus petit) */
  margin-left: 0.5rem;
}

.crypto-map-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.crypto-map-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ========================================
   PRIVACY COLUMN
======================================== */

.privacy-cell {
  text-align: center;
  font-size: 1.1rem;
  cursor: help;
}

/* ========================================
   MERCHANT COUNT & PROGRESS BARS
======================================== */

.merchant-count-cell {
  position: relative;
}

.merchant-count {
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
}

.adoption-bar-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgb(83 159 255 / 83%), rgb(53 105 255 / 62%)); 
  /* catchy : linear-gradient(90deg, rgb(83 159 255 / 83%), rgb(53 105 255 / 62%)); */
  /* soft : linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(29, 78, 216, 0.3)); */
  border-radius: 4px;
  z-index: 1;
  transition: width 0.8s ease;
}

/* ========================================
   COIN ADOPTION SCORE STYLES
======================================== */

.coin-adoption-score-cell {
  position: relative;
  height: 100%;
  min-height: 3rem;
  display: flex;
  align-items: center;
  padding: 0;
}

.coin-adoption-score-bar-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.9), rgba(250, 253, 259, 1));
  border-radius: 4px;
  z-index: 1;
  transition: width 0.8s ease;
}

.coin-adoption-score-value {
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
  color: #d97706;
  width: 100%;
  text-align: center;
  padding: 1rem;
}

/* ========================================
   STATUS COLORS
======================================== */

.positive { color: #10b981; }
.negative { color: #ef4444; }
.neutral { color: #94a3b8; }

.cmc-rank {
  font-weight: 600;
  color: #f59e0b;
}

.market-cap {
  font-weight: 600;
  color: #10b981;
}

.adoption-score {
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.score-excellent { background: #059669; color: white; }
.score-good { background: #0891b2; color: white; }
.score-average { background: #d97706; color: white; }
.score-poor { background: #dc2626; color: white; }

/* ========================================
   CHARTS & MISC
======================================== */

.chart-container {
  width: 80px;
  height: 40px;
  position: relative;
}

.mini-chart {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.loading {
  color: #6b7280;
  font-style: italic;
}

.error {
  color: #ef4444;
}

/* ========================================
   FOOTER STYLES
======================================== */

.update-time {
  text-align: center;
  margin-top: 1rem;
  color: #6b7280;
  font-size: 1rem;
  font-weight: 500;
}

.disclaimer {
  text-align: center;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
}

.contact-info {
  text-align: center;
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
}

.contact-info a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ========================================
   DOWNLOAD BUTTONS
======================================== */

.download-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.download-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

.download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* ========================================
   TOOLTIPS
======================================== */

.info-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 0.25rem;
}

.info-icon {
  width: 14px;
  height: 14px;
  background: #6b7280;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.info-icon:hover {
  background: #3b82f6;
}

.tooltip-content {
  visibility: hidden;
  width: 280px;
  background-color: #1f2937;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 0.75rem;
  position: absolute;
  z-index: 1000;
  top: 125%;
  left: -140px;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid #374151;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  line-height: 1.4;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #1f2937 transparent;
}

.info-tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Privacy Column Tooltips - Instant Display */
.privacy-cell {
  position: relative;
  cursor: help;
}

.privacy-cell::before {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #000000;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  border: 2px solid #374151;
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  margin-bottom: 8px;
  max-width: 300px;
  white-space: normal;
  text-align: center;
}

.privacy-cell::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  pointer-events: none;
  margin-bottom: -6px;
}

.privacy-cell:hover::before,
.privacy-cell:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   MOBILE VIEW TOGGLE (CoinGecko Style)
======================================== */

.view-toggle {
  display: none;
  justify-content: center;
  margin: 1rem 0;
  gap: 0.5rem;
}

.toggle-switch {
  position: relative;
  width: 160px;
  height: 36px;
  background: #374151;
  border-radius: 18px;
  border: 1px solid #4b5563;
  cursor: pointer;
  overflow: hidden;
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 76px;
  height: 32px;
  background: #3b82f6;
  border-radius: 16px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider.complete {
  transform: translateX(80px);
}

.toggle-labels {
  position: relative;
  display: none; /* Hidden as requested */
  height: 100%;
  z-index: 1;
}

.toggle-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  transition: color 0.3s ease;
  pointer-events: none;
}

.toggle-label.active {
  color: white;
}

/* ========================================
   RESPONSIVE TABLE WITH FIXED COLUMNS
======================================== */

.table-wrapper {
  position: relative;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  position: relative;
}

.table-fixed {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  background: #1e293b;
  /* Removed right border for seamless blend */
}

.table-scrollable {
  margin-left: 0;
}

/* Hide specific columns in mobile view */
.mobile-view .col-privacy,
.mobile-view .col-change,
.mobile-view .col-volume,
.mobile-view .col-timeline,
.mobile-view .col-cmc-rank,
.mobile-view .col-value-score {
  display: none;
}

/* Column classes for better control */
.col-star { width: 30px; min-width: 30px; }
.col-rank { width: 40px; min-width: 40px; }
.col-name { width: 180px; min-width: 180px; }
.col-privacy { width: 80px; min-width: 80px; }
.col-merchant { width: 140px; min-width: 140px; }
.col-change { width: 100px; min-width: 100px; }
.col-volume { width: 120px; min-width: 120px; }
.col-timeline { width: 120px; min-width: 120px; }
.col-cmc-rank { width: 100px; min-width: 100px; }
.col-market-cap { width: 140px; min-width: 140px; }
.col-value-score { width: 120px; min-width: 120px; }
.col-map { width: 60px; min-width: 60px; }
.col-cas-score { width: 120px; min-width: 120px; }
.col-sovereignty { width: 100px; min-width: 100px; }

/* Desktop-only: Larger text for # and Name columns */
@media (min-width: 769px) {
  .col-rank {
    font-size: 1.3em; /* 30% plus gros */
    font-weight: 600;
  }
  
  .col-name .crypto-name {
    font-size: 1.3em; /* 30% plus gros */
    font-weight: 600;
  }
  
  .col-name .crypto-symbol {
    font-size: 1.15em; /* Légèrement plus gros aussi */
  }
}

/* Mobile column adjustments */
@media (max-width: 768px) {
  .col-name { 
    width: 120px; 
    min-width: 120px; 
    max-width: 120px;
  }
  
  /* Prevent text wrapping in name column */
  .col-name .crypto-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
  }
}

/* ========================================
   MAP BUTTON STYLES
======================================== */

.map-btn {
  background: transparent;
  color: #10b981;
  border: 2px solid #10b981;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
}

.map-btn:hover {
  background: #059669;
  border-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: white;
  text-decoration: none;
}

.map-btn .pin-icon {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Pin icon below text on mobile */
@media (max-width: 768px) {
  .map-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.2rem 0.4rem;
    line-height: 1.2;
  }
  
  .map-btn .pin-icon {
    margin-left: 0;
    margin-top: 2px;
  }
}

/* ========================================
   SOVEREIGNTY SCORE STYLES
======================================== */

.sovereignty-score {
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: help;
  display: inline-block;
  min-width: 30px;
  text-align: center;
}

.sovereignty-score.grade-a { background: #10b981; color: white; }
.sovereignty-score.grade-b-plus { background: #059669; color: white; }
.sovereignty-score.grade-b { background: #84cc16; color: white; } /* Yellow-green for B */
.sovereignty-score.grade-b-minus { background: #0284c7; color: white; }
.sovereignty-score.grade-c { background: #d97706; color: white; }
.sovereignty-score.grade-d { background: #dc2626; color: white; }
.sovereignty-score.grade-e { background: #7f1d1d; color: white; }

/* ========================================
   PRIVACY EMOJI STYLES
======================================== */

.privacy-emoji-green {
  color: #10b981;
  font-weight: bold;
}

.privacy-emoji-yellow-green {
  color: #84cc16;
  font-weight: bold;
  font-size: 1.1em;
}

/* ========================================
   TABLE STRUCTURE STYLES
======================================== */

/* Desktop table - always visible on desktop */
.table-desktop-container {
  display: block;
}

/* Mobile tables - hidden by default */
.table-mobile-container {
  display: none;
}

/* Ensure table rows have consistent height */
.table-scrollable-container tbody tr,
.table-desktop-container tbody tr {
  height: 3rem;
  min-height: 3rem;
}

.table-scrollable-container td,
.table-desktop-container td {
  height: 3rem;
  vertical-align: middle;
}

/* Fixed table rows - 50% taller to match scrollable table better */
.table-fixed-container tbody tr {
  height: 4.5rem;
  min-height: 4.5rem;
}

.table-fixed-container td {
  height: 58px;
  line-height: 58px;
  vertical-align: middle;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
  .header h1 { font-size: 2rem; }
  .stats-overview { flex-direction: column; align-items: center; }
  .container { padding: 1rem; }
  
  /* Show mobile toggle */
  .view-toggle { display: flex; }
  
  /* Hide desktop table on mobile */
  .table-desktop-container {
    display: none;
  }
  
  /* Show mobile tables */
  .table-mobile-container {
    display: block;
  }
  
  /* Responsive table container */
  .table-container {
    position: relative;
    overflow: hidden;
  }
  
  /* Fixed columns styling for mobile */
  .table-fixed-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
    background: #1e293b;
    line-height: 58px !important;
    /* Removed right border and shadow for seamless blend */
  }
  
  .table-fixed-container table {
    margin: 0;
  }
  
  .table-scrollable-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #1e293b;
    /* Remove left border effect by matching background */
  }
  
  .table-scrollable-container table {
    margin-left: 190px; /* Ajusté : 30+40+120 = 190px (largeur des colonnes fixes) */
  }
  
  /* Ensure fixed columns are always visible */
  .table-fixed-container .col-star,
  .table-fixed-container .col-rank,
  .table-fixed-container .col-name {
    background: #1e293b;
    position: relative;
    z-index: 16;
  }
  
  /* Mobile table styling */
  th, td { 
    padding: 0.75rem 0.5rem; 
    font-size: 0.875rem;
    white-space: nowrap;
  }
  
  .download-buttons { 
    flex-direction: column; 
    gap: 0.5rem;
  }
  
  /* Scroll indicator - ONLY for mobile */
  .table-scroll-indicator {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: rgba(59, 130, 246, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
    display: none; /* Hidden by default on all screens */
  }
  
  .table-scroll-indicator.show {
    opacity: 1;
  }
  
  /* Better crypto info display on mobile */
  .crypto-info {
    gap: 0.5rem;
  }
  
  .crypto-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
  }
  
  .crypto-name {
    font-size: 0.875rem;
  }
  
  .crypto-symbol {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .header h1 { font-size: 1.75rem; }
  .container { padding: 0.5rem; }
  
  /* Even more compact on small screens */
  th, td { 
    padding: 0.5rem 0.25rem; 
    font-size: 0.8rem;
  }
  
  .col-name { width: 140px; min-width: 140px; } /* Encore plus réduit */
  .col-rank { width: 35px; min-width: 35px; } /* Plus compact */
  .col-star { width: 25px; min-width: 25px; } /* Encore plus petit */
  .col-merchant { width: 110px; min-width: 110px; }
  .col-market-cap { width: 110px; min-width: 110px; }
  .col-cas-score { width: 130px; min-width: 130px; }
  
  .table-scrollable-container table {
    margin-left: 200px; /* Encore réduit pour les petits écrans */
  }
}

/* ========================================
   REAL WORLD BANNER STYLES
======================================== */

.real-world-banner {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  max-width: 1200px; /* Même largeur que le tableau */
}

.real-world-banner img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.banner-text h3 {
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.banner-text p {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.6;
}

/* ========================================
   COMMUNITY SHOWCASE STYLES
======================================== */

.community-showcase {
  text-align: center;
  margin: 3rem auto;
  padding: 2rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  max-width: 1200px; /* Même largeur que le tableau */
}

.community-showcase h3 {
  color: #92400e;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.merchant-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.merchant-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Format carré */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.merchant-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Carrousel mobile */
.merchant-carousel {
  display: none; /* Caché par défaut */
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.merchant-carousel-container {
  display: flex;
  transition: transform 0.3s ease;
  touch-action: pan-y; /* Permet le scroll vertical mais contrôle horizontal */
}

.merchant-carousel img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1; /* Format carré */
  object-fit: cover;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(146, 64, 14, 0.3);
  cursor: pointer;
  transition: background 0.2s ease;
}

.carousel-dot.active {
  background: #92400e;
}

/* ========================================
   TIMELINE CHART STYLES
======================================== */

.timeline-section {
  margin: 2rem auto;
  padding: 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 12px;
  color: white;
  max-width: 1200px; /* Même largeur que le tableau */
}

.timeline-section h3 {
  color: #fbbf24;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.timeline-chart-container {
  height: 300px;
  position: relative;
  margin-top: 1rem;
}

.chart-source {
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* Fallback Chart Styles (CSS only) */
.fallback-chart {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chart-title {
  color: #fbbf24;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 220px;
  padding: 0 1rem;
  gap: 0.5rem;
}

.chart-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
}

.chart-bar {
  background: linear-gradient(to top, #fbbf24, #f59e0b);
  border-radius: 4px 4px 0 0;
  width: 100%;
  max-width: 40px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  animation: growUp 1.5s ease-out;
}

.chart-bar:hover {
  transform: scaleY(1.05);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

.bar-value {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chart-bar:hover .bar-value {
  opacity: 1;
}

.bar-label {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

@keyframes growUp {
  from {
    height: 0;
    transform: scaleY(0);
    transform-origin: bottom;
  }
  to {
    height: 100%;
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

/* ========================================
   METHODOLOGY SECTION STYLES
======================================== */

/* Methodology Section */
.methodology-section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.methodology-section h3 {
  color: #1e293b;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.methodology-content p {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.methodology-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.methodology-card h4 {
  color: #1e293b;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.methodology-card p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.methodology-example {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.methodology-example p {
  color: #92400e;
  margin: 0;
  font-style: italic;
}

.methodology-conclusion {
  background: #ecfdf5;
  border: 1px solid #10b981;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.crypto-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-item {
  background: white;
  padding: 1.2rem;
  border-radius: 8px;
  border: 2px solid #10b981;
  color: #065f46;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.category-item .emoji {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.final-vision {
  color: #065f46;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: center;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid #10b981;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
======================================== */

/* Footer logo clickable */
.footer-logo-link {
  display: inline-block;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.footer-logo-link:hover,
.footer-logo-link:active {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .real-world-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .real-world-banner img {
    width: 100%;
    max-width: 300px;
    height: 200px;
  }
  
  /* Cacher la galerie normale et montrer le carrousel sur mobile */
  .merchant-gallery {
    display: none;
  }
  
  .merchant-carousel {
    display: block;
  }
  
  .community-showcase {
    margin: 2rem 1rem;
    padding: 1.5rem;
    max-width: calc(100% - 2rem);
  }
  
  .timeline-section {
    padding: 1.5rem;
    margin: 2rem 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .timeline-chart-container {
    height: 250px;
  }
  
  .methodology-section {
    margin: 2rem 1rem;
    padding: 1.5rem;
    max-width: calc(100% - 2rem);
  }
  
  .methodology-section h3 {
    font-size: 1.5rem;
  }
  
  .methodology-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .crypto-categories {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   HIDE TOGGLE SWITCH
======================================== */

.view-toggle {
  display: none !important;
}

/* ========================================
   END OF STYLES
======================================== */