/* ============================================================
   Marché secondaire - Top 5  |  Figma node 11598:5222
   ============================================================ */

/* ── Inner (layout flex-col + gap, à l'intérieur du container Webflow)
      Le container gère déjà le padding horizontal (spacing-64) et le flex-column.
      ms5-inner ajoute uniquement le gap entre header / tableaux / footnote.   ── */
.ms5-inner {
  display: flex;
  flex-direction: column;
  gap: var(--_layout-2---spacing--spacing-32, 32px);
  width: 100%;
}

/* ── Header ── */
.ms5-header {
  display: flex;
  flex-direction: column;
  gap: var(--_layout-2---spacing--spacing-8, 8px);
}

.ms5-title {
  margin: 0;
  font-family: 'Capitana', sans-serif;
  font-weight: 600;
  font-size: var(--_colors---font--size--2xl, 2rem);
  line-height: 1.2;
  color: var(--_colors---color--brand--neutral--neutral-900, #23292f);
}

.ms5-date {
  margin: 0;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 400;
  font-size: var(--_colors---font--size--m, 1.125rem);
  line-height: 1.5;
  color: var(--_colors---color--brand--neutral--neutral-600, #5e666e);
}

/* ── Tables (côte à côte) ── */
.ms5-tables {
  display: flex;
  gap: var(--_layout-2---spacing--spacing-20, 20px);
  align-items: flex-start;
  width: 100%;
}

/* ── Colonne ── */
.ms5-col {
  display: flex;
  flex-direction: column;
  gap: var(--_layout-2---spacing--spacing-16, 16px);
  min-width: 0;
}

/* Ordres d'achat → prend l'espace restant */
.ms5-col:first-child {
  flex: 1 0 0;
}

/* Ordres de vente → ~40% */
.ms5-col:last-child {
  flex: 0 0 40%;
  max-width: 40%;
}

/* Titre au-dessus du bloc dégradé */
.ms5-col-title {
  margin: 0;
  font-family: 'Capitana', sans-serif;
  font-weight: 600;
  font-size: var(--_colors---font--size--m, 1.125rem);
  line-height: 1.2;
  color: var(--_colors---color--brand--neutral--neutral-900, #23292f);
}

/* ── Conteneur dégradé ── */
.ms5-table-container {
  width: 100%;
  background: linear-gradient(
    180deg,
    var(--_colors---color--brand--primary--primary-100, #f0f5ff) 0%,
    rgba(240, 245, 255, 0) 100%
  );
  border-top-right-radius: var(--_layout---radius--radius-24, 24px);
  border-bottom-left-radius: var(--_layout---radius--radius-24, 24px);
  overflow: hidden;
}

/* ── Ligne ── */
.ms5-row {
  display: flex;
  height: 40px;
  align-items: center;
  width: 100%;
  transition: background-color 0.15s ease;
}

.ms5-row:not(.ms5-row--header):hover {
  background-color: rgba(229, 238, 255, 0.45);
}

/* ── Cellule : toutes flex:1 → répartition égale sur 100% ── */
.ms5-cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--_layout-2---spacing--spacing-8, 8px) var(--_layout-2---spacing--spacing-24, 24px);
  font-family: 'Ubuntu', sans-serif;
  font-weight: 400;
  font-size: var(--_colors---font--size--s, 1rem);
  line-height: 1.5;
  color: var(--_colors---color--brand--neutral--neutral-600, #5e666e);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ligne header : medium weight + retour à la ligne autorisé */
.ms5-row--header .ms5-cell {
  font-weight: 500;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.ms5-row--header {
  height: auto;
  min-height: 40px;
}

/* État vide */
.ms5-row--empty {
  height: auto;
  min-height: 40px;
}

.ms5-cell--empty {
  font-style: italic;
  justify-content: center;
  text-align: center;
}

/* ── Note de bas de page ── */
.ms5-footnote {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--_colors---color--brand--neutral--neutral-600, #5e666e);
}

/* ── Loading / erreur ── */
.ms5-loading,
.ms5-error {
  font-family: 'Ubuntu', sans-serif;
  font-size: var(--_colors---font--size--s, 1rem);
  color: var(--_colors---color--brand--neutral--neutral-600, #5e666e);
  padding: var(--_layout-2---spacing--spacing-16, 16px) 0;
}

.ms5-error {
  color: var(--_colors---color--brand--primary--primary-600, #8a3377);
}

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

/* Middle screen (≤ 992px) */
@media screen and (max-width: 992px) {
  .ms5-cell {
    padding: var(--_layout-2---spacing--spacing-8, 8px) var(--_layout-2---spacing--spacing-16, 16px);
    font-size: var(--_colors---font--size--xs, 0.875rem);
  }

  .ms5-col:last-child {
    flex: 0 0 42%;
    max-width: 42%;
  }
}

/* Tablet (≤ 768px) → empilé verticalement */
@media screen and (max-width: 768px) {
  .ms5-tables {
    flex-direction: column;
    gap: var(--_layout-2---spacing--spacing-24, 24px);
  }

  .ms5-col:first-child,
  .ms5-col:last-child {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .ms5-title {
    font-size: var(--_colors---font--size--l, 1.5rem);
  }

  .ms5-date {
    font-size: var(--_colors---font--size--s, 0.875rem);
  }
}

/* Mobile (≤ 480px) */
@media screen and (max-width: 480px) {
  .ms5-inner {
    gap: var(--_layout-2---spacing--spacing-16, 16px);
  }

  .ms5-title {
    font-size: var(--_colors---font--size--m, 1.125rem);
  }

  .ms5-cell {
    padding: var(--_layout-2---spacing--spacing-6, 6px) var(--_layout-2---spacing--spacing-8, 8px);
    font-size: 0.75rem;
  }

  .ms5-row {
    height: 36px;
  }

  .ms5-footnote {
    font-size: 0.75rem;
  }
}

