/* ==========================================================================
   GENERAL LIVE — COMPOSANTS INLINE COMMUNS
   --------------------------------------------------------------------------
   Regroupe les styles de tous les composants rendus côté client (DOM),
   anciennement servis via iframes Grafana, partagés entre :
     - la page Live Market Watch (préfixe .lmw-*)
     - la page Home Page         (préfixe .hp-*)
   ========================================================================== */


/* ##########################################################################
   #  1) LIVE MARKET WATCH — préfixe .lmw-*
   ########################################################################## */
   @import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
/* Reset commun pour tous les composants inline */
.lmw-c, .lmw-c *, .lmw-c *::before, .lmw-c *::after {
  box-sizing: border-box;
}

/* ---------- date.html : Bandeau "Séance du …" ---------- */
.lmw-date {
  width: 100%;
  font-family: Arial, sans-serif;
}
.lmw-date .lmw-date-chart {
  width: 100%;
  height: 120px;
  padding: 8px 20px;
}
.lmw-date .lmw-date-chart[dir="rtl"],
.seance-market-watch .lmw-date-chart[dir="rtl"] {
  white-space: nowrap;
  unicode-bidi: embed;
}

/* ---------- status.html : Statut séance / marché de blocs ---------- */
.lmw-status {
  display: flex;
  justify-content: center;
}
.lmw-status .status-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #09244B;
  padding: 8px 20px;
  background: #ffffff;
  /* border: 1px solid #e0e0e0; */
  border-radius: 6px;
}
.lmw-status .status-bar[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
}
.lmw-status .status-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lmw-status .divider {
  color: #ccc;
  font-weight: 200;
  font-size: 16px;
}

/* ---------- carnetOrdre.html : KPI Tunindex grid ---------- */
.lmw-carnet {
  width: 100%;
  font-family: Helvetica, Arial, sans-serif;
}
.lmw-carnet .kpi-root {
  width: 100%;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.lmw-carnet .kpi-grid {
  width: 100%;
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
}
.lmw-carnet .kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 6px;
  text-align: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.lmw-carnet .kpi-item:before {
  content: "";
  background: #E5E7EB;
  position: absolute;
  right: 0;
  width: 1px;
  height: 40px;
}

.lmw-carnet .kpi-item:last-child:before { display: none; }
.lmw-carnet .kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: #9CA3AF;
  white-space: nowrap;
  line-height: 1.2;
}
/* Premier KPI : libellé plus long « Capitalisation boursière (TND) » */
.lmw-carnet .kpi-item:first-child {
  flex: 0.5 0 auto;
}
.lmw-carnet .kpi-value {
  font-size: 15px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
@media (max-width: 800px) {
  .lmw-carnet .kpi-item { flex: 1 1 33% !important; }
}
@media (max-width: 500px) {
  .lmw-carnet .kpi-item { flex: 1 1 100% !important; }
}

/* ---------- marche_bloc_resume.html : 3 KPI capitaux / qté / trx ---------- */
.lmw-bloc {
  width: 100%;
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.lmw-bloc .kpi {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  gap: 6px;
  border-right: 1px solid #E5E7EB;
}
.lmw-bloc .kpi:last-child { border-right: none; }
.lmw-bloc.rtl .kpi {
  border-right: none;
  border-left: 1px solid #E5E7EB;
}
.lmw-bloc.rtl .kpi:last-child { border-left: none; }
.lmw-bloc .lbl {
  font-size: 12px;
  font-weight: 400;
  color: #9CA3AF;
  text-align: center;
  white-space: nowrap;
}
.lmw-bloc .val {
  font-size: 16px;
  font-weight: 700;
  color: #0B1F3A;
  text-align: center;
  white-space: nowrap;
  direction: ltr;
}

/* ---------- tunindex_stat_banner.html & tunindex20_stat_banner.html ---------- */
.lmw-stat-banner {
  display: flex;
  justify-content: center;
  align-items: center;
}
.lmw-stat-banner .stat {
  display: inline-flex;
  align-items: center;
  background: #fff;
  /* border: 1px solid #e0e0e0; */
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  font-family: "Lato", sans-serif !important;
  /* margin-top: 15px; */
}
.lmw-stat-banner .index-val { color: #09244B; }
.lmw-stat-banner .sep      { color: #09244B; margin: 0 8px; }
.lmw-stat-banner .green    { color: #00b050; }
.lmw-stat-banner .red      { color: #ff0000; }
.lmw-stat-banner .neutral  { color: #09244B; }

/* ---------- indice.html : courbe TUNINDEX / TUNINDEX20 / Indices ---------- */
.lmw-indice-chart {
  width: 100%;
  height: 350px;
  background: #fff;
}
.lmw-indice-chart.lmw-indice-chart--big { height: 400px; }

/* ---------- Palmarès — table commune (hausses / baisses / capitaux / quantité / échanges) ---------- */
.lmw-palmares .outer {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.lmw-palmares .wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #b9c2d0 #eef1f5;
  cursor: grab;
}
.lmw-palmares .wrap.dragging { cursor: grabbing; }
.lmw-palmares .wrap::-webkit-scrollbar { height: 6px; }
.lmw-palmares .wrap::-webkit-scrollbar-track { background: #eef1f5; border-radius: 999px; }
.lmw-palmares .wrap::-webkit-scrollbar-thumb { background: #b9c2d0; border-radius: 999px; }

.lmw-palmares table {
  border-collapse: collapse;
  width: 100%;
  min-width: 390px;
  table-layout: fixed;
}
.lmw-palmares thead th {
  font-size: 12px;
  font-weight: 700;
  color: #09244B;
  height: 38px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  background: #fff;
  padding: 0 10px;
}
.lmw-palmares tbody td {
  font-size: 12px;
  color: #09244B;
  height: 28px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0 10px;
}
.lmw-palmares tbody tr { background: rgba(217, 217, 217, 0.23); }
.lmw-palmares tbody tr:hover { background: rgba(217, 217, 217, 0.45); }

.lmw-palmares .c0 { width: 17%; min-width: 65px; }
.lmw-palmares .c1 { width: 20%; min-width: 75px; }
.lmw-palmares .c2 { width: 16%; min-width: 20px; }
.lmw-palmares .c3 { width: 28%; min-width: 90px; }
.lmw-palmares .c4 { width: 19%; min-width: 95px; }

/* TOP Quantité — « QUANTITÉ TRAITÉE » visible sans scroll horizontal initial */
.lmw-palmares[data-kind="quantite"] .wrap {
  overflow-x: hidden;
}
.lmw-palmares[data-kind="quantite"] table {
  width: 100%;
  min-width: 0;
}
.lmw-palmares[data-kind="quantite"] thead th,
.lmw-palmares[data-kind="quantite"] tbody td {
  padding-left: 5px;
  padding-right: 5px;
}
.lmw-palmares[data-kind="quantite"] .c0 { width: 13%; min-width: 0; }
.lmw-palmares[data-kind="quantite"] .c1 { width: 17%; min-width: 0; }
.lmw-palmares[data-kind="quantite"] .c2 { width: 8%; min-width: 0; }
.lmw-palmares[data-kind="quantite"] .c3 { width: 22%; min-width: 0; }
.lmw-palmares[data-kind="quantite"] .c4 { width: 40%; min-width: 0; }
.lmw-palmares[data-kind="quantite"] thead th.c4 {
  overflow: visible;
  text-overflow: clip;
}
@media (max-width: 767px) {
  .lmw-palmares[data-kind="quantite"] .wrap {
    overflow-x: auto;
  }
}

.lmw-palmares .al { text-align: left; }
.lmw-palmares .ar { text-align: right; }
.lmw-palmares .ac { text-align: center; }
.lmw-palmares .up { color: #00b050; }
.lmw-palmares .dn { color: #ff0000; }
.lmw-palmares .nu { color: #9CA3AF; }
.lmw-palmares .icon-cell { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- stat_indice.html : 6 KPI (Valeur / Veille / Variation / Haut / Bas / Var. 31/12) ---------- */
.lmw-stat-indice {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  display: flex;
  align-items: stretch;
}
.lmw-stat-indice .kpi-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  gap: 6px;
  border-right: 1px solid #E5E7EB;
  text-align: center;
}
.lmw-stat-indice .kpi-item:last-child { border-right: none; }
.lmw-stat-indice.rtl .kpi-item {
  border-right: none;
  border-left: 1px solid #E5E7EB;
}
.lmw-stat-indice.rtl .kpi-item:last-child { border-left: none; }
.lmw-stat-indice .kpi-label {
  font-size: 12px;
  font-weight: 400;
  color: #9CA3AF;
  white-space: nowrap;
}
.lmw-stat-indice .kpi-value {
  font-size: 16px;
  font-weight: 700;
  color: #09244B;
  white-space: nowrap;
  direction: ltr;
}
.lmw-stat-indice .kpi-value.up { color: #16A34A; }
.lmw-stat-indice .kpi-value.dn { color: #EF4444; }

/* ---------- table_composition_indice.html : Composition d'un indice ---------- */
.lmw-composition .outer {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.lmw-composition .tbl-wrap {
  width: 100%;
  max-height: 555px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 #f3f3f3;
}
.lmw-composition .tbl-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.lmw-composition .tbl-wrap::-webkit-scrollbar-track { background: #f3f3f3; }
.lmw-composition .tbl-wrap::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
.lmw-composition table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}
.lmw-composition thead th {
  position: sticky;
  top: 0;
  background: #F6F6F6;
  font-size: 13px;
  font-weight: 700;
  color: #09244B;
  height: 40px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  z-index: 10;
  cursor: pointer;
  user-select: none;
}
.lmw-composition thead th:hover { background: #ededee; }
.lmw-composition .th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lmw-composition .sort-icon {
  opacity: 0.35;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.lmw-composition .sort-icon.active { opacity: 1; }
.lmw-composition .sort-icon.desc { transform: rotate(180deg); }
.lmw-composition tbody td {
  font-size: 12px;
  color: #09244B;
  height: 35px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
}
.lmw-composition tbody tr:nth-child(even) { background: #F8F9FA; }
.lmw-composition tbody tr:nth-child(odd)  { background: #fff; }
.lmw-composition tbody tr:hover { background: rgba(9, 36, 75, 0.05); }
.lmw-composition .up { color: #00B050; }
.lmw-composition .dn { color: #FF0000; }
.lmw-composition .gr { color: rgb(150, 150, 150); }
.lmw-composition .c0 { width: 20%; }
.lmw-composition .c1 { width: 11%; }
.lmw-composition .c2 { width: 11%; }
.lmw-composition .c3 { width: 11%; }
.lmw-composition .c4 { width: 12%; }
.lmw-composition .c5 { width: 17%; }
.lmw-composition .c6 { width: 18%; }
.lmw-composition .al { text-align: left;  padding-left: 15px; }
.lmw-composition .ar { text-align: right; padding-right: 15px; }
.lmw-composition .ac { text-align: center; }

/* ---------- marche_bloc.html : Tableau des transactions du Marché de Blocs ---------- */
.lmw-mb-table .outer {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.lmw-mb-table .tbl-wrap {
  width: 100%;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 #f3f3f3;
}
.lmw-mb-table .tbl-wrap::-webkit-scrollbar { width: 6px; }
.lmw-mb-table .tbl-wrap::-webkit-scrollbar-track { background: #f3f3f3; }
.lmw-mb-table .tbl-wrap::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
.lmw-mb-table table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}
.lmw-mb-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #09244B;
  height: 38px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  z-index: 10;
}
.lmw-mb-table tbody td {
  font-size: 12px;
  color: #09244B;
  height: 28px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
}
.lmw-mb-table tbody tr { background: rgba(217, 217, 217, 0.23); }
.lmw-mb-table tbody tr:hover { background: rgba(217, 217, 217, 0.5); }
.lmw-mb-table .empty-msg {
  text-align: center;
  color: #9CA3AF;
  font-size: 12px;
  padding: 32px 0;
  background: #fff;
  border: 0;
}
.lmw-mb-table .c0 { width: 28%; }
.lmw-mb-table .c1 { width: 18%; }
.lmw-mb-table .c2 { width: 18%; }
.lmw-mb-table .c3 { width: 20%; }
.lmw-mb-table .c4 { width: 16%; }
.lmw-mb-table .al { text-align: left;  padding-left: 10px; }
.lmw-mb-table .ar { text-align: right; padding-right: 10px; }

/* ---------- instruments.html : Tableau marché (4 instances : actions / lignes / oblig / hors cote) ---------- */
.lmw-instruments {
  --lmw-text: #09244B;
  --lmw-header-bg: #F8F9FA;
  --lmw-row-bg: #FFFFFF;
  --lmw-row-alt: #F8F9FA;
  --lmw-up: #00b050;
  --lmw-down: #ff0000;
  --lmw-bid-odd: #DFF5E9;
  --lmw-bid-even: #C7ECDA;
  --lmw-ask-odd: #FDE2E1;
  --lmw-ask-even: #F7CFCE;
  --lmw-border: #E5E7EB;
  --lmw-orange: #E9500E;
  --lmw-gray: rgb(150, 150, 150);
  font-family: 'Lato', sans-serif;
  color: var(--lmw-text);
}
.lmw-instruments .control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #F6F6F6;
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--lmw-border);
  border-bottom: none;
  gap: 12px;
}
.lmw-instruments .col-toggle-wrapper { position: relative; }
.lmw-instruments .col-toggle-btn {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--lmw-border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Lato', sans-serif;
  color: var(--lmw-text);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s;
}
.lmw-instruments .col-toggle-btn:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}
.lmw-instruments .col-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid var(--lmw-border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  min-width: 240px;
  padding: 8px 0;
}
.lmw-instruments .col-dropdown.open { display: block; }
.lmw-instruments .dd-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--lmw-border);
  margin-bottom: 4px;
}
.lmw-instruments .dd-actions button {
  padding: 5px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Lato', sans-serif;
  font-weight: 600;
}
.lmw-instruments .btn-show-all { background: var(--lmw-text); color: #fff; }
.lmw-instruments .btn-hide-all {
  background: #fff;
  color: var(--lmw-text);
  border: 1px solid var(--lmw-border) !important;
}
.lmw-instruments .dd-item {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--lmw-text);
  transition: background 0.1s;
}
.lmw-instruments .dd-item:hover { background: #F6F6F6; }
.lmw-instruments .dd-item input,
.lmw-instruments .dd-item label { cursor: pointer; }
.lmw-instruments .dd-item label { flex: 1; }
.lmw-instruments .search-wrap {
  position: relative;
  flex: 1;
  max-width: 300px;
  margin-left: auto;
}
.lmw-instruments .search-input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--lmw-border);
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Lato', sans-serif;
  color: var(--lmw-text);
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.lmw-instruments .search-input:focus { border-color: #9CA3AF; }
.lmw-instruments .search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #868FA0;
}
.lmw-instruments .table-outer { position: relative; }
.lmw-instruments .table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
  border: 1px solid var(--lmw-border);
  border-radius: 0 0 6px 6px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 #f3f3f3;
}
.lmw-instruments .scroll-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 27px;
  height: 27px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 50;
}
.lmw-instruments .scroll-btn:hover { opacity: 0.85; }
.lmw-instruments table {
  width: max-content;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.lmw-instruments thead {
  position: sticky;
  top: 0;
  z-index: 20;
}
.lmw-instruments thead tr {
  background: var(--lmw-header-bg);
  height: 48px;
}
.lmw-instruments th {
  padding: 0 0 0 12px;
  text-align: center;
  font: 700 13px 'Lato', sans-serif;
  color: var(--lmw-text);
  white-space: nowrap;
  border-bottom: 1px solid var(--lmw-border);
  border-right: 1px solid var(--lmw-border);
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.lmw-instruments th:last-child { border-right: none; }
.lmw-instruments th.fixed-col {
  position: sticky;
  left: 0;
  z-index: 30;
  background: var(--lmw-header-bg);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}
.lmw-instruments .th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  width: calc(100% - 8px);
}
.lmw-instruments th:first-child .th-inner { justify-content: flex-start; }
.lmw-instruments th .sort-icon {
  opacity: 0.35;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.lmw-instruments th.sorted .sort-icon { opacity: 1; }
.lmw-instruments th.sorted.desc .sort-icon { transform: rotate(180deg); }
.lmw-instruments th:hover { background: #EEF2F8; }
.lmw-instruments th.fixed-col:hover { background: #EEF2F8; }
.lmw-instruments th.drag-over {
  background: #dce7f5 !important;
  outline: 2px dashed #378ADD;
}
.lmw-instruments th.dragging { opacity: 0.4; }
.lmw-instruments .resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  user-select: none;
}
.lmw-instruments .resize-handle:hover,
.lmw-instruments .resize-handle.resizing {
  background: var(--lmw-orange);
  opacity: 0.6;
}
.lmw-instruments tbody tr {
  height: 32px;
  cursor: pointer;
  transition: background 0.1s;
}
.lmw-instruments tbody tr:nth-child(even) { background: var(--lmw-row-alt); }
.lmw-instruments tbody tr:nth-child(odd)  { background: var(--lmw-row-bg); }
.lmw-instruments tbody tr:hover { background: rgba(233, 80, 14, 0.06) !important; }
.lmw-instruments td {
  padding: 0 12px;
  text-align: right;
  font: 400 11px 'Lato', sans-serif;
  color: var(--lmw-text);
  white-space: nowrap;
  /* overflow: hidden; */
  text-overflow: ellipsis;
}
.lmw-instruments td:last-child { border-right: none; }
.lmw-instruments td.text-left { text-align: left; }
.lmw-instruments td.mnemo {
  text-align: left;
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}
.lmw-instruments td.fixed-col {
  position: sticky;
  left: 0;
  z-index: 10;
  background: inherit;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}
.lmw-instruments tr:nth-child(odd)  td.fixed-col { background: var(--lmw-row-bg); }
.lmw-instruments tr:nth-child(even) td.fixed-col { background: var(--lmw-row-alt); }
.lmw-instruments tbody tr:hover td.fixed-col { background: rgba(233, 80, 14, 0.06) !important; }
.lmw-instruments td.bid { background: var(--lmw-bid-even); }
.lmw-instruments tr:nth-child(odd) td.bid { background: var(--lmw-bid-odd); }
.lmw-instruments td.ask { background: var(--lmw-ask-even); }
.lmw-instruments tr:nth-child(odd) td.ask { background: var(--lmw-ask-odd); }
.lmw-instruments .up { color: var(--lmw-up); font-weight: 600; }
.lmw-instruments .down { color: var(--lmw-down); font-weight: 600; }
.lmw-instruments .neutral { color: var(--lmw-gray); }
.lmw-instruments .status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: #F1F5F9;
  color: #64748b;
}
.lmw-instruments .status-open   { background: #DCFCE7; color: #166534; }
.lmw-instruments .status-closed { background: #FEE2E2; color: #991B1B; }
.lmw-instruments .no-results {
  padding: 40px;
  text-align: center;
  color: #6B7280;
  font-size: 14px;
}

/* ---------- instruments.html : popup détail société ---------- */
.lmw-instruments-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 36, 75, 0.45);
  z-index: 9999;
}
.lmw-instruments-overlay.open { display: block; }
.lmw-instruments-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 28px 28px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(9, 36, 75, 0.18);
  z-index: 10001;
  font-family: 'Lato', sans-serif;
  color: #09244B;
  max-height: 90vh;
  overflow-y: auto;
  width: min(700px, 94vw);
}
.lmw-instruments-popup.open { display: block; }
.lmw-instruments-popup.is-moved {
  transform: none;
}
.lmw-instruments-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.lmw-instruments-popup .popup-header.is-dragging {
  cursor: grabbing;
}
.lmw-instruments-popup .popup-header .close-popup {
  cursor: pointer;
  touch-action: manipulation;
}
.lmw-instruments-popup .popup-title {
  font-size: 22px;
  font-weight: 700;
  color: #09244B;
  line-height: 1.2;
  font-family: 'DM Sans', sans-serif;
}
.lmw-instruments-popup .close-popup {
  background: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 2px solid #C5CDD8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s;
}
.lmw-instruments-popup .close-popup:hover { border-color: #09244B; }
.lmw-instruments-popup .popup-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.lmw-instruments-popup .popup-prices {
  display: flex;
  border: 1px solid #C8D0D8;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}
.lmw-instruments-popup .popup-price-item {
  padding: 12px 22px;
  border-right: 1px solid #C8D0D8;
}
.lmw-instruments-popup .popup-price-item:last-child { border-right: none; }
.lmw-instruments-popup .popup-price-label {
  font-size: 13px;
  color: #09244B;
  font-weight: 400;
  display: block;
  margin-bottom: 5px;
}
.lmw-instruments-popup .popup-price-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  color: #09244B;
}
.lmw-instruments-popup .popup-price-value.down { color: #ff0000; }
.lmw-instruments-popup .popup-price-value.up   { color: #00b050; }
.lmw-instruments-popup .voir-profil-btn {
  padding: 12px 24px;
  background: #fff;
  border: 2px solid #09244B;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: #09244B;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.lmw-instruments-popup .voir-profil-btn:hover {
  background: #09244B;
  color: #fff;
}
.lmw-instruments-popup .tabs {
  display: grid;
  gap: 4px;
  grid-auto-flow: column;
  margin-bottom: 20px;
  border-radius: 5px;
}
.lmw-instruments-popup .tab-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-family: Lato, sans-serif;
  font-weight: 400;
  transition: 0.2s;
  background: rgba(9, 36, 75, 0.05);
  color: rgb(9, 36, 75);
  line-height: 1.57143;
}
.lmw-instruments-popup .tab-btn.active {
  background: #09244B;
  color: white;
}
.lmw-instruments-popup .tab-content {
  min-height: 80px;
  margin-top: 4px;
}

/* Publications (popup instrument) */
.lmw-instruments-popup .lmw-pubs-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 6px 12px 2px;
  scrollbar-width: thin;
  scrollbar-color: #c9c9c9 #f0f0f0;
}
.lmw-instruments-popup .lmw-pubs-wrap::-webkit-scrollbar {
  width: 6px;
}
.lmw-instruments-popup .lmw-pubs-wrap::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}
.lmw-instruments-popup .lmw-pubs-wrap::-webkit-scrollbar-thumb {
  background: #c9c9c9;
  border-radius: 3px;
}
.lmw-instruments-popup .lmw-pubs-empty {
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}
.lmw-instruments-popup .lmw-pub-card {
  background-color: #f5f5f5;
  border-radius: 5px;
  padding: 15px;
  text-align: start;
}
.lmw-instruments-popup .lmw-pub-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.lmw-instruments-popup .lmw-pub-card-link:hover .lmw-pub-title {
  text-decoration: underline;
}
.lmw-instruments-popup .lmw-pub-card-inner {
  display: block;
}
.lmw-instruments-popup .lmw-pub-date {
  color: #eb6e44;
  font-size: 0.85rem;
  line-height: 1.3;
}
.lmw-instruments-popup .lmw-pub-title {
  color: #002a54;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 5px;
  line-height: 1.35;
}
.lmw-instruments-popup .lmw-pub-extra {
  margin-top: 10px;
  font-size: 13px;
}
.lmw-instruments-popup .lmw-pub-extra .voir-plus-pub {
  color: #09244b;
  font-weight: 600;
  text-decoration: none;
}
.lmw-instruments-popup .lmw-pub-extra .voir-plus-pub:hover {
  text-decoration: underline;
}

.lmw-instruments-popup .summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.lmw-instruments-popup .summary-table tr { border-bottom: 1px solid #E5E7EB; }
.lmw-instruments-popup .summary-table tr:nth-child(odd)  { background: #F9F9F9; }
.lmw-instruments-popup .summary-table tr:nth-child(even) { background: #fff; }
.lmw-instruments-popup .summary-table td { padding: 14px 20px; color: #09244B; }
.lmw-instruments-popup .summary-table td:first-child {
  font-weight: 700;
  font-size: 14px;
  text-align: left;
}
.lmw-instruments-popup .summary-table td:last-child {
  text-align: right;
  font-size: 14px;
  font-weight: 400;
}
.lmw-instruments-popup .ob-wrap {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}
.lmw-instruments-popup .ob-top-headers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 3px solid #E9500E;
}
.lmw-instruments-popup .ob-top-header {
  background: #F6F6F6;
  padding: 14px 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #09244B;
}
.lmw-instruments-popup .ob-top-header:first-child { border-right: 1px solid #E5E7EB; }
.lmw-instruments-popup .ob-col-headers {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
}
.lmw-instruments-popup .ob-col-hdr {
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #09244B;
  text-align: center;
  line-height: 1.3;
}
.lmw-instruments-popup .ob-col-hdr:nth-child(3) { border-right: 1px solid #E5E7EB; }
.lmw-instruments-popup .ob-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.lmw-instruments-popup .ob-row:last-child { border-bottom: none; }
.lmw-instruments-popup .ob-cell {
  padding: 10px 8px;
  font-size: 12px;
  text-align: center;
  color: #09244B;
}
.lmw-instruments-popup .ob-row .ob-cell:nth-child(1),
.lmw-instruments-popup .ob-row .ob-cell:nth-child(2) { background: #DFF5E9; }
.lmw-instruments-popup .ob-row .ob-cell:nth-child(3) {
  background: #DFF5E9;
  border-right: 1px solid #E5E7EB;
  font-weight: 700;
}
.lmw-instruments-popup .ob-row .ob-cell:nth-child(4) {
  background: #FDE2E1;
  font-weight: 700;
}
.lmw-instruments-popup .ob-row .ob-cell:nth-child(5),
.lmw-instruments-popup .ob-row .ob-cell:nth-child(6) { background: #FDE2E1; }
.lmw-instruments-popup .ob-row:nth-child(even) .ob-cell:nth-child(1),
.lmw-instruments-popup .ob-row:nth-child(even) .ob-cell:nth-child(2),
.lmw-instruments-popup .ob-row:nth-child(even) .ob-cell:nth-child(3) { background: #C7ECDA; }
.lmw-instruments-popup .ob-row:nth-child(even) .ob-cell:nth-child(4),
.lmw-instruments-popup .ob-row:nth-child(even) .ob-cell:nth-child(5),
.lmw-instruments-popup .ob-row:nth-child(even) .ob-cell:nth-child(6) { background: #F7CFCE; }
.lmw-instruments-popup .trades-wrap {
  max-height: 280px;
  overflow-y: auto;
  border-top: 3px solid #E9500E;
}
.lmw-instruments-popup .trades-table {
  width: 100%;
  border-collapse: collapse;
}
.lmw-instruments-popup .trades-table thead tr {
  background: #F6F6F6;
  position: sticky;
  top: 0;
  z-index: 1;
}
.lmw-instruments-popup .trades-table th {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #09244B;
  text-align: center;
  border-bottom: 1px solid #E5E7EB;
}
.lmw-instruments-popup .trades-table td {
  padding: 6px 12px;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid #E5E7EB;
}
@media (max-width: 520px) {
  .lmw-instruments-popup .popup-meta-row { flex-direction: column; align-items: flex-start; }
  .lmw-instruments-popup .voir-profil-btn { width: 100%; }
  .lmw-instruments-popup .tabs .tab-btn { padding: 9px 12px; font-size: 12px; }
}


/* ##########################################################################
   #  2) HOME PAGE — préfixe .hp-*
   ########################################################################## */

/* Reset commun */
.hp-c, .hp-c *, .hp-c *::before, .hp-c *::after {
  box-sizing: border-box;
}

/* ---------- date.html : "Séance du DD/MM/YYYY HH:MM" ---------- */
.hp-date {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Helvetica, Arial, sans-serif !important;
  color: #09244B;
  font-size: 14px;
  font-weight: 400;
  background: #FFFFFF;
  padding: 0 10px;
}
.hp-date[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
}

/* ---------- status.html : Statut séance / marché de blocs ---------- */
.hp-status {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}
.hp-status .status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #09244B;
  white-space: nowrap;
}
.hp-status .status-bar[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
}
.hp-status .status-item { display: inline-flex; align-items: center; gap: 5px; }
.hp-status .divider { color: #ccc; font-weight: 200; font-size: 16px; }

/* ---------- tunindex_banner.html / tunindex20_banner.html ---------- */
.hp-tx-banner {
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: stretch;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid #E5E7EB;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}
.hp-tx-banner .hp-tx-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  min-height: 0;
}
.hp-tx-banner .hp-tx-r1 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  gap: 12px;
}
.hp-tx-banner .hp-tx-r1 .lbl {
  text-align: right;
}
.hp-tx-banner.rtl .hp-tx-r1 .lbl {
  text-align: left;
}
.hp-tx-banner .hp-tx-r2 {
  display: flex;
  flex-direction: row;
  /* One visual row: level, daily %, annual % share the same vertical center */
  align-items: center;
  width: 100%;
}
.hp-tx-banner .hp-tx-r2-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  /* nowrap: long TUNINDEX levels must stay on one line with daily % (same as TUNINDEX20) */
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  padding-right: 16px;
  border-right: 1px solid #E5E7EB;
}
.hp-tx-banner .hp-tx-r2-right {
  flex: 0 0 auto;
  min-width: 0;
  padding-left: 16px;
  display: flex;
  align-items: center;
}
.hp-tx-banner.rtl .hp-tx-r2-left {
  border-right: none;
  border-left: 1px solid #E5E7EB;
  padding-right: 0;
  padding-left: 16px;
}
.hp-tx-banner.rtl .hp-tx-r2-right {
  padding-left: 0;
  padding-right: 16px;
}
.hp-tx-banner .lbl   { font-size: 13px; font-weight: 500; color: #09244B; line-height: 1; white-space: nowrap; }
.hp-tx-banner .title { font-size: 14px; font-weight: 700; color: #09244B; line-height: 1; white-space: nowrap; }
.hp-tx-banner .title.title--index20 {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
/* Same line box height in row 2 so cours + % + icônes s’alignent nettement */
.hp-tx-banner .hp-tx-r2 .big {
  font-size: 22px;
  font-weight: 800;
  color: #09244B;
  line-height: 26px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.hp-tx-banner .hp-tx-r2 .pct {
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 26px;
  white-space: nowrap;
}
/* AR : icône puis +0,60% (pas 0,60 % + à cause du bidi RTL) */
.hp-tx-banner.rtl .hp-tx-r2 .pct {
  direction: ltr;
}
.hp-tx-banner .hp-tx-r2 .pct .pct-val {
  display: inline-block;
  unicode-bidi: isolate;
}
.hp-tx-banner .hp-tx-r2 .pct.pct-year { font-size: 18px; }
/* Keep level + daily % as one unit (no awkward shrinking between them) */
.hp-tx-banner .hp-tx-r2-left .big,
.hp-tx-banner .hp-tx-r2-left > .pct {
  flex-shrink: 0;
}
.hp-tx-banner .green { color: #00B050; }
.hp-tx-banner .red   { color: #FF0000; }
.hp-tx-banner .icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.hp-tx-banner .icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

@media (max-width: 640px) {
  .hp-tx-banner .hp-tx-inner { padding: 8px 12px; gap: 5px; }
  .hp-tx-banner .hp-tx-r2-left { padding-right: 12px; }
  .hp-tx-banner .hp-tx-r2-right { padding-left: 12px; }
  .hp-tx-banner.rtl .hp-tx-r2-left { padding-left: 12px; }
  .hp-tx-banner.rtl .hp-tx-r2-right { padding-right: 12px; }
  .hp-tx-banner .title         { font-size: 13px; }
  .hp-tx-banner .lbl           { font-size: 12px; }
  .hp-tx-banner .hp-tx-r2 .big {
    font-size: 18px;
    line-height: 22px;
  }
  .hp-tx-banner .hp-tx-r2 .pct,
  .hp-tx-banner .hp-tx-r2 .pct.pct-year {
    font-size: 15px;
    line-height: 22px;
  }
}

/* ---------- statistiques_banner.html : panneau capi/cap/qty/trx/h/b/actives ---------- */
.hp-stats-panel {
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  font-family: "Lato", sans-serif !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hp-stats-panel .stat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 10px;
  padding: 0 15px;
  height: 28px;
  border-bottom: 1px solid #E5E7EB;
  font-size: 12px;
  color: #09244B;
  }
.hp-stats-panel .stat-row.hb-row {
  display: flex;
  justify-content: space-between;
}
.hp-stats-panel .stat-row:last-child { border-bottom: none; }
.hp-stats-panel .stat-label {
  grid-column: 1;
  font-weight: 600;
  text-align: left;
}
.hp-stats-panel .stat-value {
  grid-column: 2;
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  justify-self: end;
}
.hp-stats-panel .green { color: #00b050; }
.hp-stats-panel .red   { color: #ff0000; }

/* AR : col. gauche = valeurs, col. droite = libellés (grille LTR, alignement maquette) */
.hp-stats-panel.rtl .stat-row {
  direction: ltr;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 12px;
}
.hp-stats-panel.rtl .stat-value {
  grid-column: 1;
  text-align: right;
  justify-self: stretch;
  direction: ltr;
  unicode-bidi: isolate;
}
.hp-stats-panel.rtl .stat-label {
  grid-column: 2;
  text-align: right;
  justify-self: stretch;
  direction: rtl;
}
.hp-stats-panel.rtl .stat-row.hb-row .stat-value:nth-child(1) {
  grid-column: 1;
  text-align: right;
  direction: rtl;
  unicode-bidi: plaintext;
}
.hp-stats-panel.rtl .stat-row.hb-row .stat-value:nth-child(2) {
  grid-column: 2;
  text-align: right;
  direction: rtl;
  unicode-bidi: plaintext;
}

/* ---------- tunindex_stat_banner.html / tunindex20_stat_banner.html (mini) ---------- */
.hp-stat-mini {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}
.hp-stat-mini .stat {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  font-family: "Lato", sans-serif !important;
  white-space: nowrap;
}
.hp-stat-mini .index-val { color: #09244B; }
.hp-stat-mini .sep       { color: #09244B; margin: 0 8px; }
.hp-stat-mini .green     { color: #00b050; }
.hp-stat-mini .red       { color: #ff0000; }
.hp-stat-mini .neutral   { color: #09244B; }

/* ---------- indice courbe (TUNINDEX / TUNINDEX20) ---------- */
.hp-indice-chart {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: #fff;
}

/* ---------- KPI tables (hausses / baisses / capitaux / quantite / transactions) ---------- */
.hp-kpi-table {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  border-top: 4px solid var(--orange);
  margin-top: 5px;
}
.hp-kpi-table .wrap {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #b9c2d0 #eef1f5;
  cursor: grab;
}
.hp-kpi-table .wrap.dragging { cursor: grabbing; }
.hp-kpi-table .wrap::-webkit-scrollbar { height: 6px; }
.hp-kpi-table .wrap::-webkit-scrollbar-track { background: #eef1f5; border-radius: 999px; }
.hp-kpi-table .wrap::-webkit-scrollbar-thumb { background: #b9c2d0; border-radius: 999px; }
.hp-kpi-table table {
  border-collapse: collapse;
  min-width: 100%;
  width: max-content;
  font-family: 'DM Sans', sans-serif;
}
.hp-kpi-table th {
  font-size: 11px;
  font-weight: 700;
  color: #09244B;
  padding: 0 10px;
  height: 38px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  background: #fff;
}
.hp-kpi-table td {
  font-size: 12px;
  color: #09244B;
  padding: 0 10px;
  height: 21px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
}
.hp-kpi-table tbody tr { background: rgba(217,217,217,0.23); }
.hp-kpi-table tbody tr:hover { background: rgba(217,217,217,0.5); }
.hp-kpi-table .up { color: #00b050; }
.hp-kpi-table .dn { color: #ff0000; }
.hp-kpi-table .nu { color: #9CA3AF; }
.hp-kpi-table .l { text-align: left;  }
.hp-kpi-table .r { text-align: right;}
html[lang="ar"] .hp-kpi-table .r { direction: ltr;}
.hp-kpi-table .c { text-align: center; }
.hp-kpi-table .icon-cell { display: inline-flex; align-items: center; justify-content: center; height: 21px; }

/* ---------- marche de blocs : transactions ---------- */
.hp-mb-table {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.hp-mb-table .wrap {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 #f3f3f3;
}
.hp-mb-table .wrap::-webkit-scrollbar { width: 6px; }
.hp-mb-table .wrap::-webkit-scrollbar-track { background: #f3f3f3; }
.hp-mb-table .wrap::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
.hp-mb-table table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-family: 'DM Sans', sans-serif;
}
.hp-mb-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #09244B;
  height: 38px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  z-index: 10;
}
.hp-mb-table tbody td {
  font-size: 12px;
  color: #09244B;
  height: 28px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}
.hp-mb-table tbody tr { background: rgba(217,217,217,0.23); }
.hp-mb-table tbody tr:hover { background: rgba(217,217,217,0.5); }
.hp-mb-table .empty-msg {
  text-align: center;
  color: #9CA3AF;
  font-size: 12px;
  padding: 32px 0;
}
.hp-mb-table .c0 { width: 28%; }
.hp-mb-table .c1 { width: 18%; }
.hp-mb-table .c2 { width: 18%; }
.hp-mb-table .c3 { width: 20%; }
.hp-mb-table .c4 { width: 16%; }
.hp-mb-table .al { text-align: left;  padding-left: 10px; }
.hp-mb-table .ar { text-align: right; padding-right: 10px; }


/* ##########################################################################
   #  3) MARCHÉ PRINCIPAL — préfixe .mp-*
   ########################################################################## */

/* Reset commun */
.mp-c, .mp-c *, .mp-c *::before, .mp-c *::after {
  box-sizing: border-box;
}

/* ---------- date.html : "Séance du …" (banner haut) ---------- */
.mp-date {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Helvetica, Arial, sans-serif !important;
  color: #09244B;
  font-size: 14px;
  font-weight: 500;
  background: #FFFFFF;
  padding: 0 10px;
  width: 100% !important;
  margin: 0 !important;
}
.mp-date[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
}

/* ---------- status.html : Statut séance / marché de blocs ---------- */
.mp-status {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}
.mp-status .status-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #09244B;
  margin: 0 !important;
  width: 100% !important;
}
.mp-status .status-bar[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
}
.mp-status .status-item { display: inline-flex; align-items: center; gap: 5px; }
.mp-status .divider { color: #ccc; font-weight: 200; font-size: 16px; }

/* ---------- tunindex_stat_banner.html / tunindex20_stat_banner.html (même layout que hp-tx-banner) ---------- */
.chart-card-courbe .mp-stat-banner.tunindex_stat_simple,
.presentation-marche-principal .chart-card-courbe .mp-stat-banner.hp-tx-banner {
  position: static;
  top: auto;
  right: auto;
  width: 100% !important;
  max-height: none;
  height: 90px;
  margin-bottom: 8px;
  z-index: 1;
}

/* ---------- indice.html : courbe TUNINDEX / TUNINDEX20 ---------- */
.mp-indice-chart {
  width: 100%;
  height: 350px;
  background: #FFFFFF;
}

/* ---------- carnet_ordre_marche_principal.html : 7 KPI cards (Cap.Boursière) ---------- */
.mp-cards-panel {
  width: 100%;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-family: 'DM Sans', sans-serif;
}
.mp-cards-panel[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
  direction: ltr;
}
.mp-cards-panel .card {
  flex: 1;
  min-width: 120px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mp-cards-panel .card-top {
  width: 100%;
  height: 4px;
  background: #E9500E;
  border-radius: 4px 4px 0 0;
}
.mp-cards-panel .card-label {
    font-size: 13px;
    font-weight: 700;
    color: #09244B;
    text-align: center;
    padding: 15px 10px;
    line-height: 1.3;
    background: #F3F3F3;
    width: 100%;
}
.mp-cards-panel .card-value {
    font-size: 13px;
    font-weight: 400;
    color: #09244B;
    text-align: center;
    padding: 15px 10px 0;
}
.mp-c.mp-cards-panel {
  border-bottom: 0;
}
.mp-cards-panel .card-value.up { color: #24BE58; }
.mp-cards-panel .card-value.dn { color: #FF0000; }

/* ---------- capitaux_marche_principal.html / quantite_marche_principal.html ----------
   Tableau 2 colonnes (VALEUR | CAPITAUX ou VALEUR | QUANTITÉ)                          */
.mp-cap-table {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.mp-cap-table table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-family: 'DM Sans', sans-serif;
}
.mp-cap-table table[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
  direction: ltr;
}
/* Palmarès AR : symbole à droite, en-têtes multilignes, chiffres alignés */
html[lang="ar"] .lmw-palmares,
html[lang="ar"] .lmw-palmares table {
  direction: ltr !important;
  font-family: "Cairo", "Noto Sans Arabic", Arial, sans-serif;
}
html[lang="ar"] .lmw-palmares thead th {
  white-space: normal;
  line-height: 1.3;
  height: auto;
  min-height: 40px;
  padding: 6px 8px;
  text-align: right;
  vertical-align: middle;
  overflow: visible;
  text-overflow: clip;
}
html[lang="ar"] .lmw-palmares tbody td {
  text-align: right;
}
html[lang="ar"] .lmw-palmares tbody td.c1,
html[lang="ar"] .lmw-palmares tbody td.c3,
html[lang="ar"] .lmw-palmares tbody td.c4 {
  direction: ltr;
  unicode-bidi: isolate;
}
html[lang="ar"] .lmw-palmares .c0 { width: 16%; min-width: 52px; }
html[lang="ar"] .lmw-palmares .c1 { width: 18%; min-width: 58px; }
html[lang="ar"] .lmw-palmares .c2 { width: 10%; min-width: 28px; }
html[lang="ar"] .lmw-palmares .c3 { width: 22%; min-width: 72px; }
html[lang="ar"] .lmw-palmares .c4 { width: 34%; min-width: 80px; }
html[lang="ar"] .lmw-palmares[data-kind="quantite"] thead th,
html[lang="ar"] .lmw-palmares[data-kind="quantite"] tbody td {
  padding-left: 4px;
  padding-right: 4px;
}
html[lang="ar"] .lmw-palmares[data-kind="quantite"] .c4 {
  width: 38%;
  min-width: 0;
}
html[lang="ar"] .lmw-palmares[data-kind="capitaux"] .c4,
html[lang="ar"] .lmw-palmares[data-kind="echanges"] .c4 {
  width: 30%;
}
.mp-cap-table thead th {
  background: #FAFAFA;
  font-size: 12px;
  font-weight: 700;
  color: #09244B;
  height: 50px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}
.mp-cap-table tbody td {
  font-size: 12px;
  color: #09244B;
  height: 50px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
}
.mp-cap-table tbody tr { background: #fff; }
.mp-cap-table tbody tr:hover { background: rgba(217,217,217,0.1); }
.mp-cap-table .c0 { width: 60%; }
.mp-cap-table .c1 { width: 40%; }
.mp-cap-table .al { text-align: left;  padding-left: 12px; }
.mp-cap-table .ar { text-align: right; padding-right: 12px; }

/* ---------- hausses_marche_principal.html / baisses_marche_principal.html ----------
   Tableau 3 colonnes (VALEUR | DERNIER + icône | VARIATION)                            */
.mp-hb-table {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.mp-hb-table table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-family: 'DM Sans', sans-serif;
}
.mp-hb-table table[dir="rtl"] {
  font-family: 'Cairo', 'Noto Sans Arabic', Arial, sans-serif;
  direction: ltr;
}
.mp-hb-table thead th {
  background: #FAFAFA;
  font-size: 12px;
  font-weight: 700;
  color: #09244B;
  height: 50px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}
.mp-hb-table tbody td {
  font-size: 12px;
  color: #09244B;
  height: 50px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
}
.mp-hb-table tbody tr { background: #fff; }
.mp-hb-table tbody tr:hover { background: rgba(217,217,217,0.15); }

/* LTR : VALEUR(50%) | DERNIER+icône(30%) | VARIATION(20%) */
.mp-hb-table.ltr .c0 { width: 50%; }
.mp-hb-table.ltr .c1 { width: 30%; }
.mp-hb-table.ltr .c2 { width: 20%; }
/* RTL : VARIATION(20%) | DERNIER+icône(40%) | VALEUR(40%) */
.mp-hb-table.rtl .c0 { width: 20%; }
.mp-hb-table.rtl .c1 { width: 40%; }
.mp-hb-table.rtl .c2 { width: 40%; }

.mp-hb-table .al { text-align: left;  padding-left: 20px; }
.mp-hb-table .ar { text-align: right; padding-right: 20px; }
.mp-hb-table .up { color: #00b050; }
.mp-hb-table .dn { color: #ff0000; }
.mp-hb-table .last-cell {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.mp-hb-table .last-cell svg { flex-shrink: 0; }

/* ---------- marche_bloc.html : Tableau Marché de Blocs (5 colonnes) ---------- */
.mp-mb-table {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.mp-mb-table .tbl-wrap {
  width: 100%;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 #f3f3f3;
}
.mp-mb-table .tbl-wrap::-webkit-scrollbar { width: 6px; }
.mp-mb-table .tbl-wrap::-webkit-scrollbar-track { background: #f3f3f3; }
.mp-mb-table .tbl-wrap::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 3px; }
.mp-mb-table table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-family: 'DM Sans', sans-serif;
}
.mp-mb-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #09244B;
  height: 38px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  z-index: 10;
}
.mp-mb-table tbody td {
  font-size: 12px;
  color: #09244B;
  height: 28px;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
  vertical-align: middle;
}
.mp-mb-table tbody tr { background: rgba(217,217,217,0.23); }
.mp-mb-table tbody tr:hover { background: rgba(217,217,217,0.5); }
.mp-mb-table .empty-msg {
  text-align: center;
  color: #9CA3AF;
  font-size: 12px;
  padding: 32px 0;
  background: #fff;
  border: 0;
}
.mp-mb-table .c0 { width: 28%; }
.mp-mb-table .c1 { width: 18%; }
.mp-mb-table .c2 { width: 18%; }
.mp-mb-table .c3 { width: 20%; }
.mp-mb-table .c4 { width: 16%; }
.mp-mb-table .al { text-align: left;  padding-left: 10px; }
.mp-mb-table .ar { text-align: right; padding-right: 10px; }


/* ##########################################################################
   #  SITE TICKER — bandeau header (data-bourse-ticker, WS market)
   ########################################################################## */
.ticker-container .bourse-ticker.ticker-outer,
.ticker-container .ticker-outer {
  width: 100%;
  height: 48px;
  background: #061B3A;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-container .ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.ticker-container .bourse-ticker__band {
  display: inline-flex;
  align-items: center;
}

.ticker-container .ticker-item {
  display: inline-flex;
  align-items: center;
  padding-right: 60px;
  font-family: 'Lato', 'DM Sans', sans-serif;
  font-size: 15px;
}

.ticker-container .ticker-name {
  font-weight: 700;
  color: #fff;
  margin-right: 10px;
}

.ticker-container .ticker-price {
  font-weight: 400;
  color: #fff;
}

.ticker-container .ticker-icon {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 0 8px;
}

.ticker-container .ticker-var { font-weight: 400; }
.ticker-container .ticker-var.up { color: #3FE497; }
.ticker-container .ticker-var.dn { color: #F74D40; }
.ticker-container .ticker-var.nu { color: #9CA3AF; font-weight: 700; }
