body {
  margin : 0;
  background: #060a13;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.header-links a:hover {
  opacity: 0.7;       
}

.header-links {
  display: flex;
  gap: 24px;
  padding: 8px 32px 4px;
  align-items: center;
  background: #060a13;
  position: sticky;   /* ou fixed/ sticky */
  top: 0;
  z-index: 100;
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px 40px;
  text-align: center;
}

/* La page crypto en elle-même n’hérite plus du centrage global */
.crypto-page {
  text-align: left;
}

/* Colonnes de la grille crypto */
.crypto-head-row > .col-rank,
.crypto-row-inner > .col-rank {
  text-align: center;  /* # centré */
}

.crypto-head-row > .col-name,
.crypto-row-inner > .col-name {
  text-align: left;    /* Nom bien collé à gauche */
}

.crypto-head-row > .col-price,
.crypto-row-inner > .col-price,
.crypto-head-row > .col-perf,
.crypto-row-inner > .col-perf,
.crypto-head-row > .col-mcap,
.crypto-row-inner > .col-mcap,
.crypto-head-row > .col-volume,
.crypto-row-inner > .col-volume {
  text-align: right;   /* chiffres alignés à droite, plus lisible */
}

/* Bouton “Passer un ordre” déjà à droite grâce à flex-end */
.crypto-head-row > .col-actions,
.crypto-row-inner > .col-actions {
  text-align: right;
}

/* Couleurs des variations % de la page crypto */
.crypto-page .col-perf.pct-up {
  color: #16c784 !important;
  font-weight: 600;
}

.crypto-page .col-perf.pct-down {
  color: #ea3943 !important;
  font-weight: 600;
}

.crypto-page .col-perf.pct-flat {
  color: #a9adbd !important;
}

.btn-order {
  appearance: none;
  background: #10162a;
  color: #e6e9f3;
  border: 1px solid #2a324d;

  padding: 6px 12px;
  border-radius: 6px;

  font-size: 0.85rem;
  font-weight: 600;

  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.btn-order:hover {
  background: #151d35;
  border-color: #3cf7c9;
  color: #ffffff;
}

.btn-order:active {
  background: #0d1224;
}


/* ===== Surbrillance des lignes crypto ===== */

.crypto-page .crypto-row-inner {
  border-radius: 10px;
  padding: 8px 8px;
  transition:
    background 0.12s ease,
    transform 0.05s ease;
}

.crypto-page .crypto-row:hover .crypto-row-inner {
  background: #101623;           /* léger highlight */
}

.crypto-page .crypto-row:hover .btn-order {
  border-color: #3cf7c9;         /* petit accent sur le bouton */
}

/* Titres de la home */
.site-title {
  font-size: 3.2em;
  font-weight: 900;
  margin-top : 0;
  margin-bottom: 16px;
}

.site-subtitle {
  font-size: 1.45em;
  font-weight: 800;
  margin-bottom: 20px;
}

.site-subtitle span {
  color: #3cf7c9;
}

.site-desc {
  font-size: 1.06em;
  color: #b1b4c3;
  margin-bottom: 36px;
}

/* --------- RECHERCHE (alignée sur la page Crypto) --------- */

.search-wrap {
  display: flex;
  justify-content: center;
  max-width: 100%;              /* pleine largeur comme crypto */
  margin: 0 auto 24px auto;     /* marge basse similaire */
  position: relative;
  gap: 0;
}

.search-wrap input {
  flex: 1;
  padding: 14px 16px;           /* comme le input de la page crypto */
  border-radius: 12px 0 0 12px;
  border: none;
  font-size: 1em;               /* même taille de police que crypto */
  background: #fff;
  color: #0f1422;
}

.search-wrap button {
  background: #3cf7c9;
  color: #181d2c;
  font-weight: 700;
  border-radius: 0 12px 12px 0;
  border: none;
  font-size: 1em;               /* idem crypto */
  padding: 14px 18px;           /* idem crypto */
  cursor: pointer;
}

/* suggestions */
.suggest{
  position:absolute; left:0; right:160px; top:100%; margin-top:6px;
  background:#0f1422; border:1px solid rgba(255,255,255,.08);
  border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.35);
  max-height:320px; overflow:auto; z-index:50;
}
.suggest.hidden{ display:none; }
.sug-item{ display:flex; justify-content:space-between; align-items:center;
           gap:10px; padding:10px 14px; cursor:pointer;
           border-bottom:1px solid rgba(255,255,255,.04); }
.sug-item:last-child{ border-bottom:0; }
.sug-item:hover, .sug-item.active{ background:#151d2e; }
.sug-left{ display:flex; flex-direction:column; }
.sug-name{ color:#fff; font-weight:700; }
.sug-sym{ color:#a9adbd; font-size:.9rem; }
.sug-mic{ color:#7f8496; font-size:.85rem; }
@media (max-width:520px){ .suggest{ right:0; } }

/* --------- CARTES CATÉGORIES --------- */

/* Titres dans les cartes Marchés */
.home-cat-card h2,
.home-cat-card h3 {
  letter-spacing: 0; 
}


.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 26px;
  max-width: 1100px;
  margin: 24px auto 0 auto;
}

.home-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  background: #111624;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 30px 22px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.08em;

  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  transition:
    transform 0.14s ease-out,
    box-shadow 0.14s ease-out,
    background 0.14s ease-out,
    border-color 0.14s ease-out;
}

.home-cat-card:hover {
  transform: translateY(-4px);
  background: #151b2b;
  border-color: rgba(60,247,201,0.45);
  box-shadow: 0 18px 40px rgba(0,0,0,0.7);
}

.home-cat-icon {
  font-size: 2.4em;
  margin-bottom: 14px;
}

.home-cat-text {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-cat-label {
  white-space: nowrap;
}

.market-card h2 {
  font-size: 1.8em;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.market-card p {
  font-size: 1.05em;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.market-card span {
  font-size: 0.95em;
  color: #aeb2c3;
}



/* Responsive : réduire un peu les tailles sur mobile */
@media (max-width: 768px) {
  .site-title { font-size: 2.2em; }
  .site-subtitle { font-size: 1.2em; }
  .home-cat-card { padding: 22px 16px; }
}

/* ===== Barre d’ordre inline sur la page crypto ===== */

.crypto-page .order-inline {
  padding: 4px 0 6px 0;
}

/* container principal de la barre d'ordre */
.crypto-page .order-inline .ob-bar {
  display: flex;
  align-items: center;
  gap: 8px;

  background: transparent;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px 8px;
  font-size: 0.8rem;     
  box-shadow: none;
}

.crypto-page .order-inline .ob-title {
  font-weight: 600;
  color: #d5d8e7;
  opacity: 0.75;
  margin-right: 4px;
  white-space: nowrap;
}

/* input quantité */
.crypto-page .order-inline .ob-input {
  background: #0b101b;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 3px 6px;
  color: #e6e9f3;
  min-width: 80px;
  font-size: 0.78rem;
}

/* texte "Estimé : ... €" */
.crypto-page .order-inline .ob-est {
  display: flex;
  align-items: center;
  gap : 4px;
  color: #b6bccf;
  font-size: 0.78rem;
  margin-left: 4px;
  white-space: nowrap;
}

/* boutons Acheter / Vendre */
.crypto-page .order-inline .ob-buy,
.crypto-page .order-inline .ob-sell {
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
  font-size: 0.78rem;
  border: none;
  cursor: pointer;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease-out, opacity 0.08s ease-out;
}

.crypto-page .order-inline .ob-buy {
  background: #16c784;
  color: #02140b;
}

.crypto-page .order-inline .ob-sell {
  background: #ea3943;
  color: #ffffff;
}

.crypto-page .order-inline .ob-buy:active,
.crypto-page .order-inline .ob-sell:active {
  transform: translateY(0);
  opacity: 0.8;
}

/* ===== Boutons Acheter / Vendre côte à côte ===== */

.crypto-page .order-inline .ob-actions {
  display: flex;
  align-items: left;
  gap: 6px;   /* espace entre Acheter et Vendre */
}

.crypto-page .order-inline .ob-form {
  display: inline-flex;   /* empêche le retour à la ligne */
  margin: 0;
}


/* ===== PAGE ETF alignée sur design Crypto ===== */

/* filtres région */
.etf-region-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px auto 18px auto;
}

.etf-region-btn {
  appearance: none;
  border-radius: 999px;
  padding: 8px 18px;
  border: 1px solid #2d3347;
  background: #111624;
  color: #d7d9e4;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.etf-region-btn.active {
  background: #3cf7c9;
  border-color: #3cf7c9;
  color: #0b1020;
}

/* Nom ETF */
.etf-name-main {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.etf-name-sub {
  font-size: 0.8rem;
  color: #a9adbd;
}

/* colonnes numériques */
.etf-page .col-mcap,
.etf-page .col-volume {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}


/* ===== Ajustement typographie spécifique page ETF ===== */

.etf-page .site-title {
  font-size: 2.2em;                 /* comme dans category.html */
  font-weight: 800;
  text-align: center;               /* centré malgré .crypto-page { text-align:left } */
  margin: 24px 0 8px 0;
}

.etf-page .site-title span {
  color: #3cf7c9;                   /* même vert que “Cryptomonnaies” */
}

.etf-page .site-subtitle {
  font-size: 1.05em;                /* même taille que la phrase sous le titre crypto */
  font-weight: 600;
  color: #b1b4c3;
  text-align: center;
  margin-bottom: 26px;
}


.crypto-head-row,
.crypto-row-inner {
  display:grid;
  grid-template-columns:
    minmax(32px, 0.5fr)
    minmax(220px, 2.4fr)
    minmax(90px, 1.0fr)
    minmax(80px, 0.9fr)
    minmax(80px, 0.9fr)
    minmax(80px, 0.9fr)
    minmax(120px, 1.2fr)
    minmax(120px, 1.2fr)
    minmax(140px, 1.1fr);
  align-items:center;
  column-gap: 14px;
}


/* ===== Grille spécifique pour la liste ETF ===== */

.etf-head-row {
  display: grid;
  grid-template-columns:
    minmax(32px, 0.5fr)
    minmax(220px, 2.6fr)
    minmax(90px, 1.0fr)
    minmax(80px, 0.9fr)
    minmax(80px, 0.9fr)
    minmax(80px, 0.9fr)
    minmax(90px, 1.0fr)
    minmax(120px, 1.2fr)
    minmax(140px, 1.1fr);
  align-items: center;
  column-gap: 14px;
  font-size: 12.5px;
  color: #a9adbd;
  padding: 0 6px 6px 6px;
  margin: 4px auto 4px auto;
}

.etf-row .crypto-row-inner {
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;                /* même taille que la page crypto */
}

.etf-row .crypto-row-inner {
  display: grid;
  grid-template-columns:
    minmax(32px, 0.5fr)
    minmax(220px, 2.6fr)
    minmax(90px, 1.0fr)
    minmax(80px, 0.9fr)
    minmax(80px, 0.9fr)
    minmax(80px, 0.9fr)
    minmax(90px, 1.0fr)
    minmax(120px, 1.2fr)
    minmax(140px, 1.1fr);
  align-items: center;
  column-gap: 14px;
  padding: 8px 4px;
  font-size: 13px;
}

.etf-row {
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.etf-row:first-of-type {
  border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 980px) {
  .etf-head-row {
    display: none;
  }
  .etf-row .crypto-row-inner {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }
}

.etf-row .etf-name-main {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.etf-row .etf-name-sub {
  font-size: 11px;
  color: #a9adbd;
}

.col-actions {
  display: flex;
  justify-content: flex-end;      /* bouton collé au bord droit de la grille */
}

/* ===== Barre de recherche pleine largeur pour la page ETF ===== */

.etf-page .search-wrap {
  max-width: 100%;      /* au lieu de 600px */
  width: 100%;
  margin : 0 0 24px 0;
  padding: 0 24px;      /* même marges que la crypto */
  box-sizing: border-box;

  display : flex;
  gap : 10px;
}

.etf-page .search-wrap input {
  flex: 1;
  padding: 14px 16px;
  border-radius : 12px 0 0 12px;
  border: none;
  font-size: 1em;
  background : #ffffff;
  color : #0f1422;
}

.etf-page .search-wrap button {
  background: #3cf7c9;
  color: #181d2c;
  font-weight: 700;
  border-radius: 0 12px 12px 0;
  border: none;
  font-size: 1em;
  padding: 14px 18px;
  cursor: pointer;
}


.flash-wrap{
  max-width: 900px;
  margin: 18px auto 0 auto;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flash{
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid rgba(255,255,255,0.08);
  background: #111624;
  color: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.flash-success{ border-color: rgba(60,247,201,0.35); }
.flash-info{ border-color: rgba(120,170,255,0.35); }
.flash-warning{ border-color: rgba(255,200,90,0.35); }
.flash-error{ border-color: rgba(255,120,120,0.40); }


/* ===== Modern Auth UI ===== */
.auth-wrap{
  min-height: 75vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 28px 14px;
  background: transparent;
}

.auth-card{
  width:100%;
  max-width: 420px;
  padding: 26px 26px 22px;
  border-radius: 22px;
  background: rgba(17, 22, 36, 0.62);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
}

.auth-title{
  margin: 0 0 18px 0;
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.92);
  text-align:center;
}

.auth-form{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.field{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.field label{
  font-size: 0.88rem;
  color: rgba(255,255,255,0.60);
  font-weight: 600;
}

.field input{
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(12, 16, 28, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.field input::placeholder{
  color: rgba(255,255,255,0.35);
}

.field input:focus{
  border-color: rgba(79,220,255,0.45);
  box-shadow: 0 0 0 4px rgba(79,220,255,0.12);
  background: rgba(12, 16, 28, 0.70);
}

.btn{
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  cursor:pointer;
  font-weight: 800;
  font-size: 0.98rem;
  transition: transform .06s, filter .15s, box-shadow .15s, background .15s;
}

.btn-primary{
  color: rgba(255,255,255,0.92);
  background: rgba(79,220,255,0.12);
  border-color: rgba(79,220,255,0.30);
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

.btn-primary:hover{
  background: rgba(79,220,255,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
}

.btn-primary:active{ transform: translateY(1px); }

.btn-secondary{
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.btn-secondary:hover{ background: rgba(255,255,255,0.09); }
.btn-secondary:active{ transform: translateY(1px); }

.auth-divider{
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 18px 0;
}

.auth-muted{
  margin: 0 0 6px 0;
  text-align:center;
  color: rgba(255,255,255,0.55);
  font-size: 0.92rem;
}

.auth-footer{
  margin-top: 16px;
  text-align:center;
  color: rgba(255,255,255,0.55);
  font-size: 0.92rem;
}

.auth-footer a{
  color: rgba(79,220,255,0.95);
  text-decoration: none;
  font-weight: 800;
}

.auth-footer a:hover{
  text-decoration: underline;
}


/* Empêche tout débordement dans la card */
.auth-card, .auth-card *{
  box-sizing: border-box;
}

.btn, .field input{
  max-width: 100%;
}

/* Optionnel: évite que les ombres donnent une impression de débordement */
.auth-card{
  overflow: hidden;
}
