/*body.loading {
    cursor: wait !important;
}*/

/* Affiché pendant la recherche élargie côté Yahoo Finance (ticker absent
   du tableau local) — style "toast" sobre, cohérent avec les tokens du
   design system plutôt que des couleurs codées en dur. */
body.loading::before {
  content: "Recherche élargie du ticker en cours…";
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-sm);
  box-shadow: var(--sh);
  z-index: 9999;
  pointer-events: none;
  animation: marches-loading-in .2s ease;
}

@keyframes marches-loading-in {
  from { opacity: 0; transform: translate(-50%, -4px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.container {
    padding: 24px;
    margin: 0;
}


/* ── Module Top 10 CAGR ─────────────────────────────────────── */
.top-cagr-module {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 16px 20px 20px;
    margin-bottom: 16px;
}
.top-cagr-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}
.top-cagr-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-2);
}
.top-cagr-sub {
    font-size: .72rem;
    color: var(--text-3);
}
.top-cagr-select {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 4px 8px;
    cursor: pointer;
}
.top-cagr-select:hover { border-color: var(--blue); }
.top-cagr-select:focus { outline: none; border-color: var(--blue); }
.dc-carousel {
    position: relative;
}
.dc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sh-sm);
    color: var(--text-2);
    transition: background var(--tr), border-color var(--tr);
    flex-shrink: 0;
}
.dc-arrow:hover { background: var(--blue-50); border-color: var(--blue); color: var(--blue); }
.dc-arrow-left  { left: -15px; }
.dc-arrow-right { right: -15px; }
.top-cagr-grid {
    overflow: hidden;
}
.top-cagr-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    will-change: transform;
}
.top-cagr-grid .dc-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 0 0 200px;
}
.top-cagr-grid .dc-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.top-cagr-grid .dc-nom {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}
.top-cagr-grid .dc-nom:hover { color: var(--blue); }
.top-cagr-grid .dc-sector {
    font-size: .7rem;
    color: var(--text-3);
    margin-top: -3px;
}
.top-cagr-grid .dc-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 2px;
}
.top-cagr-grid .dc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    font-size: .77rem;
}
.top-cagr-grid .dc-label { color: var(--text-3); }
.top-cagr-grid .dc-val   { font-weight: 500; color: var(--text); text-align: right; }
.top-cagr-grid .dc-pos   { color: #16a34a; font-weight: 600; }
.top-cagr-grid .dc-neg   { color: #b91c1c; font-weight: 600; }
.top-cagr-grid .dc-cagr-hero {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    padding: 10px 0 2px;
}
.top-cagr-grid .dc-cagr-lbl {
    text-align: center;
    font-size: .67rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 6px;
}
.dc-rank {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
    padding-bottom: 1px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-3);
}
.dc-rank-1 { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.dc-rank-2 { background: #94a3b8; border-color: #94a3b8; color: #fff; }
.dc-rank-3 { background: #b45309; border-color: #b45309; color: #fff; }

/* ── Barre d'outils ─────────────────────────────────────────── */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    padding: 10px 16px;
}

.toolbar-info {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 100px;
    padding-right: 12px;
    border-right: 1px solid var(--border);
}

.toolbar-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-2);
}

.row-count {
    font-size: .75rem;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    min-height: 1em;
}

.toolbar-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.toolbar-search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-3);
    pointer-events: none;
    flex-shrink: 0;
}

#searchInput {
    width: 100%;
    padding: 7px 12px 7px 34px;
    font-size: .875rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

#searchInput:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(1,143,250,.1);
}

#searchInput::placeholder { color: var(--text-4); }

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pagination-top-hidden { display: none !important; }

/* Filtre par type de support */
.type-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.type-filter-bar:empty { display: none; }

.type-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: .8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
    transition: background var(--tr), color var(--tr), border-color var(--tr);
    white-space: nowrap;
    line-height: 1.4;
}
.type-chip.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.type-chip-count {
    font-size: .72rem;
    opacity: .75;
}

/* Filtres actifs */
.active-filters {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 6px 16px;
}
.active-filters:empty { padding: 0; border-top: none; }

/* — TABLEAU — */
#tickersTableId {
    display: none;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
    background-color: #fff;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    border: 1px solid var(--border);
}

#tickersTableId th,
#tickersTableId td {
    padding: 8px 12px;
    text-align: left;
    font-size: 0.875rem;
    border-bottom: 1px solid #eaeaea;
}

#tickersTableId th {
    background-color: var(--bg);
    color: var(--text-2);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

#tickersTableId tbody tr {
    transition: background-color 0.2s ease;
}
#tickersTableId tbody td:nth-child(1),
#tickersTableId tbody td:nth-child(2) {
    cursor: pointer;
}

#tickersTableId tbody tr:hover {
    background-color: var(--blue-50);
}

#tickersTableId td input[type="number"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

#tickersTableId td input[type="number"]:focus {
    border-color: #018ffa;
    outline: none;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ======== DRAPEAU DE DEVISES ======== */
.currency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.flag-icon {
  display: inline-block;
  height: 14px;
  width: auto;
  /*margin-right: 2px;*/
}
/* ======== FIN DE DRAPEAU DE DEVISES ======== */


/* -------------------------------------------------------------------- */
/* ZONE AFFICHAGE DES FILTRES ACTIFS
/* -------------------------------------------------------------------- */

.active-filters {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .82rem;
}

.filter-badge {
  background: #e0e0e0;
  border-radius: 12px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-badge button.remove-filter {
  background: none;
  border: none;
  padding: 3px 6px;
  border-radius: 10px;
  font-size: 14px;
  /*font-weight: bold;*/
  cursor: pointer;
  color: var(--text-3);
}

.filter-badge button.remove-filter:hover {
  color: #c00;
}



/* -------------------------------------------------------------------- */
/* GESTION DES FILTRES                                                  */
/* -------------------------------------------------------------------- */
.filter-icon {
  cursor: pointer;
  margin-left: 5px;
  display: inline-block;
  vertical-align: middle;
}

.filter-icon svg {
  fill: #666;
  width: 14px;
  height: 14px;
  transition: fill 0.2s;
}

.filter-icon:hover svg {
  fill: #FEB019;
}

.filter-icon.active svg {
  fill: #FEB019;
}

/* Popup du champ de filtre */
.column-filter-popup {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  padding: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100px;
}

.column-filter-popup input {
  width: 100%;
  padding: 3px;
  font-size: 0.85em;
  box-sizing: border-box;
}

/* Popup checklist Secteur */
.filter-check-popup { width: 220px !important; padding: 10px 12px !important; gap: 0 !important; }
.filter-check-header { padding-bottom: 6px; }
.filter-check-toggle { display: flex; align-items: center; gap: 6px; font-size: .82rem; cursor: pointer; font-weight: 600; color: var(--text-2); }
.filter-check-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--blue);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 0;
}
.filter-check-sep { border: none; border-top: 1px solid var(--border); margin: 0 0 6px; }
.filter-check-list { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; }
.filter-check-item {
    display: flex; align-items: center; gap: 7px;
    font-size: .82rem; cursor: pointer;
    padding: 3px 2px; border-radius: 4px;
    color: var(--text);
}
.filter-check-item:hover { background: var(--bg); }
.filter-check-item input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--blue);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin: 0;
}
.filter-check-actions { display: flex; justify-content: flex-end; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 8px; }
.filter-check-apply { padding: 5px 12px; background: var(--blue); color: #fff; border: none; border-radius: var(--r-sm); font-size: .82rem; cursor: pointer; }
.filter-check-apply:hover { opacity: .88; }
.filter-check-reset { padding: 5px 10px; background: #fff; color: var(--text-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: .82rem; cursor: pointer; }
.filter-check-reset:hover { background: var(--bg); }






/* — PAGINATION — */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 0 4px;
    gap: 2px;
}


.pagination button {
    padding: 5px 11px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    font-size: .82rem;
    color: var(--text-2);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.pagination button:hover:not(.active) { background: var(--blue-50); color: var(--blue); border-color: var(--blue); }
.pagination button.active { background: var(--blue); color: #fff; border-color: var(--blue); }

#pagination-bottom { margin-top: 0; }

/* Capsule stylée pour ticker */
.capsule-ticker {
    display: inline-flex;
    justify-content: center;
    min-width: 58px;
    background: var(--gold);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    align-items: center;
    white-space: nowrap;
}
a.capsule-ticker:hover { color: var(--blue); opacity: 1; }

/* ── Sélecteur de colonnes ─────────────────────────────────── */
.col-picker-wrap {
    position: relative;
    flex: 0 0 auto;
}
.col-picker-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: .82rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--text-2);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.col-picker-btn:hover { background: var(--blue-50); color: var(--blue); border-color: var(--blue); }

.col-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    box-shadow: var(--sh);
    padding: 12px 16px 14px;
    z-index: 200;
    min-width: 260px;
}
.col-picker-title {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-3);
    margin-bottom: 8px;
}
.col-picker-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
}
.col-picker-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.col-picker-item input[type="checkbox"] { cursor: pointer; }

/* ── Badges d'indice ───────────────────────────────────────── */
.indice-badge {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: .04em;
    white-space: nowrap;
    vertical-align: middle;
}
.indice-sp500 {
    background: var(--blue);
    color: #fff;
}
.indice-sp400 {
    background: transparent;
    color: var(--blue);
    border: 1.5px solid var(--blue);
}
.indice-pos {
    font-size: .75rem;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    margin-left: 6px;
    vertical-align: middle;
}
.indice-total { color: var(--text-4); }

/* Tooltip sur les badges */
.indice-badge[data-tooltip],
.indice-mini[data-tooltip] { position: relative; }

.indice-badge[data-tooltip]::after,
.indice-mini[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, .88);
    color: #fff;
    font-size: .72rem;
    font-weight: 400;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    transition-delay: 0s;
    z-index: 300;
}
.indice-badge[data-tooltip]:hover::after,
.indice-mini[data-tooltip]:hover::after {
    opacity: 1;
    transition-delay: .55s;
}

/* Mini-badge inline dans la colonne Nom */
.indice-mini {
    display: inline-flex;
    align-items: center;
    font-size: .59rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: .04em;
    white-space: nowrap;
    vertical-align: middle;
}

/* Masquer une colonne via le picker */
.col-hidden { display: none !important; }

.blue-background {
    background-color: #018FFA;
}

/* Tri visuel sur entête */
#tickersTableId th.sorted-asc::after {
    content: " ▲";
    font-size: 0.7em;
}

#tickersTableId th.sorted-desc::after {
    content: " ▼";
    font-size: 0.7em;
}


.red {
    color: #b32424; /*red;*/
  }

.blue {
    color:  #018FFA; /*var(--blue); */
}



@media  screen and (max-width: 768px) {


    .container {
        max-width: 100%;
    }

    .not-on-mobile {
        display: none;
    }

    h1 {
        font-size: 1.4rem;
        text-align: center;
    }

    .entete-liste {
        flex-direction: column;
        gap: 10px;    
        align-items: center;
    }

    
    .pagination,
    #pagination-bottom {
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination button {
        font-size: 0.9rem;
        margin: 5px 4px;
    }

    #tickersTableId th, #tickersTableId td {
        padding: 10px;
        font-size: 0.85rem;
    }

    .capsule-ticker {
        min-width: 50px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }

}

/* Input devise manquante dans une ligne temporaire */
.devise-required-cell { vertical-align: middle; }
.devise-import-input {
    width: 72px;
    padding: 3px 6px;
    border: 1.5px solid var(--blue);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg);
    color: var(--text);
    outline: none;
}
.devise-import-input::placeholder { font-weight: 400; text-transform: none; }
.devise-import-input.input-error { border-color: #b91c1c; }





/* ── Ligne de chargement initial ── */
.table-loading-row td {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-2, #888);
    font-style: italic;
}
