
/* ======== CONTAINER ======== */
.container {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    max-width: 1600px;
}

.entete-container {
    display: flex;
    top: 40px;
    z-index: 999;
}

/* ======== MESSAGES FLASH ======== */
.flash-container {
  position: fixed;
  top: 10%;
  left: 50%;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash-message {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  color: #0b1f33;
  background: #e6f4ff;
  border: 1px solid #b3e1ff;
  font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.flash-message.visible { opacity: 1; transform: translateY(0); }
.flash-message.hide    { opacity: 0; transform: translateY(-6px); }
.flash-message.success { background: #e9f9ef; border-color:#bdecca; color:#0f5132; }
.flash-message.error   { background: #fdecea; border-color:#f5c2c0; color:#842029; }
.flash-message.warning { background: #fff6e5; border-color:#ffe2ad; color:#7a4d00; }
.flash-message.info    { background: #e6f4ff; border-color:#b3e1ff; color:#0b1f33; }
/* ======== FIN MESSAGES FLASH ======== */


/* ======== DRAPEAU DE DEVISES ======== */
.flag-icon {
  display: inline-block;
  height: 15px;
  width: auto;
  margin: 0 5px 0 10px;
}


/* ======== LIENS VERS LISTES ET PORTEFEUILLES ======== */
.ticker-badges-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
}
/* Surcharge dans le banner (fond sombre) */
.hero-banner .ticker-badge-link,
.hero-banner .ticker-badge-link-pf {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.4);
    color: rgba(255,255,255,.9);
}
.hero-banner .ticker-badge-link:hover,
.hero-banner .ticker-badge-link-pf:hover {
    background: rgba(255,255,255,.25);
    color: #fff;
    border-color: rgba(255,255,255,.8);
}

.ticker-badge-link {
    display: inline-block;
    background-color: #eef2f6;
    color: var(--text-2);
    padding: 2px 12px 4px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #018ffa;
    transition: all 0.2s ease;
}

.ticker-badge-link:hover {
    background-color: #018ffa;
    color: #ffffff;
    border-color: #018ffa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticker-badge-link-pf {
    display: inline-block;
    background-color: #eef2f6;
    color: var(--text-2);
    padding: 2px 12px 4px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--blue);
    transition: all 0.2s ease;
}

.ticker-badge-link-pf:hover {
    background-color: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* ======== CONTRÔLES : DURÉE + SWITCH ======== */
.page-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0 0;
    padding: 8px 0;
}


/* ======== INFO-BULLE ACCUMULATION/DISTRIBUTION ======== */
.info-icon {
  display: inline-block;
  align-self: flex-start;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #333;
  background: #f5f5f5;
  color: #333;
  text-align: center;
  font-size: 8px;
  font-weight: bold;
  line-height: 10px;
  cursor: pointer;
  position: relative;
  margin-left: 2px;
}
.info-icon:hover {
  background-color: #018FFA;
  border-color: #018FFA;
  color: #fff;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 200%;
  left: 50%;
  transform: translateX(-90%);
  background: #fff;
  color: #444;
  padding: 6px 8px;
  border: 1px solid #018FFA;
  border-radius: 4px;
  white-space: pre-line;
  font-weight: normal;
  font-size: 12px;
  line-height: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  min-width: 200px;
  word-wrap: break-word;
  text-align: left;
  box-shadow: 0px 0px 4px rgba(0,0,0,0.5);
  z-index: 200;
}

.info-icon::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #018FFA transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.info-icon:hover::after,
.info-icon:hover::before {
  opacity: 1;
  transition: opacity 0.3s ease 0.3s;
}
/* ======== FIN INFO-BULLE ======== */


/* ======== BOUTON SWITCH AUTO-ADJUST ======== */
.switch-autoadj-container {
    display: flex;
    align-items: center;
    min-width: 121px;
    opacity: 0.5;
    transition: opacity 100ms ease-in-out;
}
.switch-autoadj-container:hover {
    opacity: 1;
}

.autoadj-switch-text {
    font-size: 13px;
    color: var(--text-2);
}

.switch {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 12px;
    margin-right: 5px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: var(--blue);
    top: 0; left: 0; right: 0; bottom: 0;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #0ACC3A;
}

input:checked + .slider:before {
    transform: translateX(12px);
}
/* ======== FIN SWITCH AUTO-ADJUST ======== */


/* ======== BOUTONS DURÉE ======== */
.duration-button {
    font-size:12px;
    font-weight: 500;
    color: var(--text-2);
    background-color: #f0f0f0;
    border: 2px solid #e7e7e7;
    padding:3px 6px;
    margin: 1px 0 1px 1px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 100ms ease-in-out;
}

.duration-button:hover {
    background: #e6e6e6;
    border: 2px solid #018FFA;
    opacity: 1;
}

.duration-button.active {
  background-color: #018FFA;
  color: white;
  font-weight: bold;
  border: 1px solid #018FFA;
  opacity: 1;
}
/* ======== FIN BOUTONS DURÉE ======== */


/* ======== HERO BANNER ======== */
.hero-banner {
    background: linear-gradient(135deg, #013a6b 0%, #0163b8 55%, #018ffa 100%);
    border-radius: var(--r);
    padding: 24px 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-banner-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(254,176,25,.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Identité */
.hero-top { position: relative; margin-bottom: 20px; }

.hero-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.hero-capsule {
    background: var(--gold);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .03em;
}

.hero-price-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    padding: 2px 10px;
}

.hero-price-val {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.hero-price-devise {
    font-size: .72rem;
    color: rgba(255,255,255,.75);
    font-weight: 500;
}

.hero-indice-tag {
    font-size: .68rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    padding: 2px 8px;
    border-radius: 4px;
}

.hero-h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -.01em;
}

/* KPI cells dans le banner */
.hero-cells {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 16px;
}

.hero-cell {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.22);
    border-bottom: 3px solid var(--gold);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: background .18s;
}
.hero-cell:hover { background: rgba(255,255,255,.22); }
.hero-cell-main { flex: 1.6; min-width: 150px; }

.hero-cell-label {
    font-size: .63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: rgba(255,255,255,.68);
    margin-bottom: 4px;
}

.hero-cell-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
/* Le JS ajoute/retire la classe .rouge — on la surcharge ici pour le contexte banner */
.hero-banner .rouge { color: #fca5a5 !important; }
.hero-cell-val-neg { color: #fca5a5; }

.hero-cell-sub {
    font-size: .72rem;
    color: rgba(255,255,255,.62);
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 800px) {
    .hero-banner { padding: 18px 16px; }
    .hero-cells { gap: 6px; }
    .hero-cell { min-width: 100px; padding: 10px 12px; }
    .hero-cell-value { font-size: 1.2rem; }
    .hero-h1 { font-size: 1.25rem; }
}
/* ======== FIN HERO BANNER ======== */


/* ======== COURS TICKER (header) ======== */
.cours-ticker {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-2);
    gap: 3px;
}

.titre-devise {
    margin: 0;
}
/* ======== FIN COURS TICKER ======== */


/* .header-card remplacé par .hero-banner */


/* ======== GRAPHIQUES ======== */
.charts-section {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    overflow: hidden;
}

#chart-price,
#chart-volume,
#chart-recul {
    width: 100%;
}

.container-graphique {
    width: 100%;
}
/* ======== FIN GRAPHIQUES ======== */


/* ======== TOOLTIPS ======== */
.tt {
    position: absolute;
    display: none;
    pointer-events: none;
    font: 600 13px/1.4 system-ui, Arial, sans-serif;
    color: #111;
    background: rgba(255,255,255,0.85);
    padding: 5px 8px;
    border: 2px solid rgba(254, 178, 25, 0.95);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 100;
    will-change: transform;
}
.tt-color {
    --couleur: #018FFA;
    display:inline-block;
    width:10px;
    height:10px;
    border-radius:2px;
    background: var(--couleur);
}
.tt-title {
    margin-bottom:6px;
    white-space: nowrap;
}
.tt-line {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
}
.tt-label {
    font-weight: normal;
    white-space: nowrap;
}
.tt-value {
    margin-left: auto;
    white-space: nowrap;
}
/* ======== FIN TOOLTIPS ======== */


/* ======== GRILLE DE STATISTIQUES ======== */
.section-stats {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    padding: 20px 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0;
}

.stat-card {
    background: var(--bg);
    border: none;
    border-radius: var(--r-sm);
    padding: 12px 16px;
}

.stat-card-recul {
    background: #fff0f0;
}

.stat-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--blue);
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.stat-card-recul .stat-card-title {
    color: #b91c1c;
    border-bottom-color: #fcd5d5;
}

.stat-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-2);
    padding: 3px 0;
    flex-wrap: wrap;
}

.stat-label {
    flex: 0 0 auto;
    color: #94a3b8;
    white-space: nowrap;
}

.stat-value {
    font-weight: 600;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.stat-date {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

.stat-row.bold .stat-value {
    color: var(--blue);
}

.stat-card-recul .stat-row.bold .stat-value {
    color: #b91c1c;
}

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: 1fr; }
}
/* ======== FIN GRILLE DE STATISTIQUES ======== */


/* ======== GAINS ANNUELS ======== */
.section-gains {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    padding: 20px 24px;
}

.section-gains h2 {
    margin-bottom: 16px;
}

.gains-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.gains-chart {
    flex: 1;
}

.gains-stats {
    width: 210px;
    flex-shrink: 0;
    padding-top: 30px;
    border-left: 1px solid #e2e8f0;
    padding-left: 20px;
}

#chartGains {
    position: relative;
}

@media (max-width: 800px) {
  .gains-layout { flex-direction: column; }
  .gains-stats { width: auto; border-left: none; padding-left: 0; border-top: 1px solid #e2e8f0; padding-top: 12px; }
}
/* ======== FIN GAINS ANNUELS ======== */


/* ======== SECTION SOCIÉTÉ ======== */
.section-societe {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    padding: 20px 24px;
}

/* Faits clés : liste de chips horizontaux */
.societe-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
    margin-bottom: 16px;
}

.fact-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 14px 6px 0;
    border-right: 1px solid var(--border);
    margin-right: 14px;
    font-size: .85rem;
    color: var(--text-2);
}
.fact-item:last-child { border-right: none; margin-right: 0; }

.fact-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-3);
    white-space: nowrap;
}

.fact-val { color: var(--text); }

.societe-desc { margin-top: 4px; }

.desc-text, .desc-note {
    color: var(--text-2);
    font-size: 0.875rem;
    line-height: 1.7;
}
/* ======== FIN SECTION SOCIÉTÉ ======== */


/* ======== SECTION FINANCE ======== */
.section-finance {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    padding: 20px 24px;
}

.finance-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-top: 12px;
}

.finance-chart-area {
    flex: 1;
    min-width: 0;
}

.finance-stats-area {
    width: 230px;
    flex-shrink: 0;
}

.financial-toolbar {
    margin: 0 0 12px;
    display: flex;
    gap: 10px;
}

.btn-switch {
    padding: 5px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #555;
}
.btn-switch:hover { border: 2px solid #FEB019; }
.btn-switch.active { background: #FEB019; color: #fff; border-color: #FEB019; }

@media (max-width: 800px) {
  .finance-layout { flex-direction: column; }
  .finance-stats-area { width: auto; }
  .not-on-mobile { display: none; }
}
/* ======== FIN SECTION FINANCE ======== */


/* ======== TITRES DE PAGE ======== */
h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--blue);
    margin: 0 0 5px;
}

h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-2);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.01em;
}

h3 {
    font-size: 1.05rem;
    color: var(--text-2);
    margin-top: 1.2rem;
    font-weight: 600;
}

h4 {
    font-size: 1.2rem;
    padding-bottom: 10px;
}

.sous-titre {
    display: flex;
    align-items: center;
}

.sous-titre .ticker,
.entete-container .ticker {
    flex: 0 1 auto;
    font-weight: bold;
    font-size: 16px;
    max-height: 24px;
    background-color: #FEB019;
    padding: 4px 8px;
    color: white;
    border-radius: 6px;
}

.devise-titre {
    color: var(--text-2);
    font-weight: bold;
    font-size: 20px;
}

.entete-boutons-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
/* ======== FIN TITRES ======== */


/* ======== COULEURS SÉMANTIQUES ======== */
.bleu  { color: #018ffa; }
.vert  { color: var(--blue); }
.rouge { color: #e60000; }

em { color: #444; }

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px;
}

hr.rapport {
    margin: 5px 0;
}

.hr-top-margin { margin-top: 30px; }
.hr-bottom-margin { margin-bottom: 30px; }
/* ======== FIN COULEURS ======== */


/* ======== STATISTIQUES RAPPORT (style liste) ======== */
.strategie-rapport {
    margin: 10px 0;
}

.rapport-title {
    margin-right: auto;
    color: var(--text-2);
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 0 4px;
}

.rapport-line {
    display: flex;
    flex-direction: row;
    color: var(--text-2);
    font-size: 0.85rem;
    padding: 2px 0;
}

.rapport-label {
    margin-right: auto;
    color: var(--text-2);
    font-size: 0.85rem;
}

.rapport-value {
    display: flex;
    color: var(--text-2);
    justify-content: flex-end;
    font-size: 0.85rem;
    margin-right: 4px;
}

.rapport-date {
    color: var(--text-2);
    font-size: 0.85rem;
}

.bold {
    font-weight: bold;
}
/* ======== FIN STATISTIQUES RAPPORT ======== */


/* ======== DESCRIPTION ======== */
[id*="description"] a {
    font-size: 0.9rem;
    color: #0066cc;
    text-decoration: none;
    font-weight: bolder;
}
/* ======== FIN DESCRIPTION ======== */


/* ======== TABLEAU FINANCIER ======== */
.table-financial-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px;
  background-color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 10px;
}

.table-financial {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  color: #1e293b;
  background-color: #fff;
}

.table-financial thead th {
  position: sticky;
  top: 0;
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 14px;
}

.table-financial thead th:first-child {
  text-align: left;
  font-size: 14px;
}

.table-financial tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.9rem;
  color: #1e293b;
}

.table-financial tbody td:first-child {
  font-weight: 400;
  color: var(--text-2);
  text-align: left;
}

.table-financial tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

@media (hover: hover) {
  .table-financial tbody tr:hover {
    background-color: #f1f5f9;
  }
}

.table-financial th.annee-bleue,
.table-financial td.annee-bleue {
  color: var(--text-2);
  border-left: 2px solid #FEB019;
  font-weight: 600;
}
/* ======== FIN TABLEAU FINANCIER ======== */


/* ======== FAB BUTTON ======== */
:root {
  --fab-size: 45px;
  --fab-bg: #FEB019;
  --fab-bg-hover: #e6a016;
  --fab-color: #ffffff;
  --fab-shadow: 0 10px 20px rgba(0,0,0,.25);
  --menu-gap: 15px;
  --menu-btn-bg: #ffffff;
  --menu-btn-color: #018ffa;
  --menu-btn-border: 2px solid #feb019;
  --menu-btn-hover-bg: #f1f5f9;
}

.fab {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--menu-gap);
  z-index: 999;
}

.fab-main {
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  border: none;
  background: var(--fab-bg);
  color: var(--fab-color);
  font-size: calc(var(--fab-size) * 0.6);
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--fab-shadow);
  transform: scale(1);
  transform-origin: center;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab-main:hover { background: var(--fab-bg-hover); }
.fab-main:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }

@media (width >= 768px) {
    :root { --fab-size: 64px; }
    .fab { right: 50px; bottom: 50px; }
    .fab-icon { transform: translateY(-7%); }
}

.fab-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  align-items: flex-end;
  text-align: right;
}

.fab-action {
  min-width: 220px;
  padding: 10px 14px;
  border-radius: 25px;
  background: var(--menu-btn-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  transform-origin: bottom right;
  transform: translateY(8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, background-color .18s ease;
  pointer-events: none;
}

#btn-add-list { color: var(--text-2); border: 2px solid #018FFA; }
#btn-add-list:hover { background: #f0f9ff }
#addToPortfolioBtn { color: var(--text-2); border: 2px solid var(--blue); }
#addToPortfolioBtn:hover { background: #efffef }

.fab-action:focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }

.fab-main:hover {
  transform: scale(1.12);
  box-shadow: 0 14px 28px rgba(0,0,0,.28);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.fab.is-open .fab-main {
  transform: scale(1.12);
  box-shadow: 0 14px 28px rgba(0,0,0,.28);
}
.fab.is-open .fab-action {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
/* ======== FIN FAB BUTTON ======== */


/* ======== AJOUT DANS LISTE / PORTEFEUILLE ======== */
.container-boutons-ajout {
    display: flex;
    position: relative;
    gap: 10px;
}

#add-to-list-container {
    display: flex;
    position: relative;
    flex: 1 1 auto;
}

#add-to-list-container button {
    flex: 1;
    background-color: #018ffa;
    font-size: 14px;
    font-weight: 600;
    color: white;
    border: none;
    padding: 5px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#add-to-list-container button:hover { background-color: #0277cc; }

#list-dropdown {
    display: none;
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #018FFA;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 250px;
    z-index: 1000;
}

#list-options div {
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
#list-options div:hover { background-color: #f0f8ff; }

.blue-bullet::before { content: "•"; color: #018FFA; margin-right: 6px; }

#list-dropdown hr { border: none; border-top: 1px solid #ddd; margin: 10px 0; }

#create-list-form { margin-top: 10px; }
#create-list-form input {
    width: calc(100% - 120px);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-right: 5px;
}
#new-list-title { font-size: 14px; padding: 4px; }
#create-list-form button {
    padding: 6px 12px;
    background-color: #018ffa;
    color: white;
    margin-left: auto;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#create-list-form button:hover { background-color: #0277cc; }

#portfolioDropdown {
    display: none;
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid var(--blue);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 250px;
    z-index: 1000;
}

#portfolioList li {
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
#portfolioList li:hover { background-color: #eeffee; }

.green-bullet::before { content: "•"; color: #26E766; margin-right: 6px; }

#portfolioDropdown hr { border: none; border-top: 1px solid #ddd; margin: 10px 0; }

#newPf {
    width: calc(100% - 120px);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-right: 5px;
    font-size: 14px;
}

#createPfBtn,
#submitOrderBtn {
    padding: 6px 12px;
    background-color: var(--blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
}
#submitOrderBtn { margin-top: 25px; }
#createPfBtn:hover, #submitOrderBtn:hover { background-color: #0db336; }

#modalOverlay,
#modalOverlayList,
#modalOverlayPf {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

#orderModal {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 2px solid var(--blue);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 250px;
}

#orderModal h2 {
    font-size: 22px;
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.ligne-portefeuille { display: flex; gap: 5px; margin-top: 10px; }
.label-portefeuille { flex: 0 0 auto; color: #018FFA; font-size: 1.1rem; font-weight: bold; }
.nom-portefeuille { flex: 1 0 auto; color: #018FFA; font-size: 1.1rem; font-weight: bold; text-align: right; }
.nom-portefeuille option { text-align: left; }

#modalPfSelect {
    appearance: none;
    border: 1px solid #fff;
    outline: none;
    background-color: transparent;
}
#modalPfSelect:hover, #modalPfSelect:focus { border: 1px solid #ccc; }

.modal-form { display: flex; gap: 10px; flex-direction: column; }
.cout { display: flex; gap: 10px; max-width: 250px; align-items: stretch; }
.modal-form input, .modal-form select {
    flex: 1 1 auto;
    text-align: right;
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 6px;
}
.devise-cout {
    background-color: #FEB019;
    color: white;
    font-weight: bold;
    padding: 5px 7px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.devise-cout option { background-color: #ffefce; color: #333; }
/* ======== FIN AJOUT LISTE/PORTEFEUILLE ======== */


/* ======== CHART FINANCIAL ======== */
.chart-financial {
    position: relative;
    width: 100%;
}

.chart-empty-overlay {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    font: 600 14px/1.4 Arial, sans-serif;
    color: #666;
}

.u-title {
    text-align: left;
    color: var(--text-2);
}

.background-bleu { background-color: #dfeefa; }

.no-small-screen { display: block; }

@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.1rem; }
  .no-small-screen { display: none; }
}
