/* La tribune de l'Arène, la page d'un trade clôturé, les trades marquants et le
   calendrier public (03/11/2026). Maquette validée : `static/maquettes/arene-tribune.html` ;
   on la suit de près. Les couleurs viennent de la charte (`charte.css`) ; l'or de
   l'Arène est celui d'`arene.css`.

   ⚠️ Rien ne se fête sur un résultat (règle de la gamification) : pas d'animation sur
   un gain, le vert et le rouge disent seulement le signe.
   ⚠️ Pas de cadre dans un cadre ; à 375 px, aucune barre de défilement horizontale. */

.tb, .at, .ac, .ad, .tb-volet-hote { --tb-or: #FCD34D; --tb-vert: var(--success, #4ADE80); --tb-rouge: var(--loss, #F87171); }
.tb-plus { color: var(--tb-vert); } .tb-moins { color: var(--tb-rouge); }
.tb-sim { display: inline-block; padding: 1px 7px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  font-size: 10.5px; color: var(--muted-foreground); vertical-align: middle; margin-left: 6px; letter-spacing: .02em; font-weight: 400; }
.tb-sens { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.tb-sens--achat { color: var(--tb-vert); } .tb-sens--vente { color: var(--tb-rouge); }

/* ══ LA TRIBUNE ══════════════════════════════════════════════════════════════════ */
.tb { margin-top: 28px; }
.tb-tete { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tb-tete h2 { margin: 0; font-size: var(--text-xl); }
.tb-tete p { margin: 4px 0 0; color: var(--muted-foreground); font-size: var(--text-sm); }
.tb-filtres { display: inline-flex; padding: 4px; border-radius: var(--radius-pill); background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.tb-filtres button { border: 0; background: transparent; color: var(--muted-foreground); padding: 7px 14px; border-radius: var(--radius-pill);
  font: inherit; font-size: var(--text-sm); cursor: pointer; }
.tb-filtres button[aria-pressed="true"] { background: rgba(139,127,224,.2); color: var(--foreground); }
.tb-chiffres { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.tb-chiffre { padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.tb-chiffre b { display: block; font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.tb-chiffre small { color: var(--muted-foreground); font-size: var(--text-xs); }
.tb-grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tb-vide { color: var(--muted-foreground); font-size: var(--text-sm); padding: 16px; border: 1px dashed var(--border-strong); border-radius: 14px; }
.tb-carte { position: relative; display: grid; gap: 12px; padding: 16px; border-radius: 18px; cursor: pointer; text-align: left; width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); border: 1px solid var(--border);
  color: inherit; font: inherit; transition: transform .16s ease, border-color .16s ease; }
.tb-carte:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.tb-carte:focus-visible { outline: 2px solid var(--ring, #B4A8FF); outline-offset: 2px; }
.tb-carte--position { border-color: rgba(74,222,128,.35); box-shadow: 0 10px 30px -20px rgba(74,222,128,.6); }
.tb-carte--position.tb-carte--perd { border-color: rgba(248,113,113,.35); box-shadow: 0 10px 30px -20px rgba(248,113,113,.6); }
.tb-haut { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-avatar { position: relative; width: 44px; height: 44px; border-radius: 14px; flex: none; }
.tb-avatar .ar-pastille { width: 44px; height: 44px; border-radius: 14px; }
.tb-rang { position: absolute; right: -6px; bottom: -6px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; background: #1C1B22; border: 1px solid var(--border-strong); padding: 0 5px; }
.tb-rang--1 { background: linear-gradient(140deg, #FDE68A, #F59E0B); color: #2B2010; border: 0; }
.tb-rang--2 { background: linear-gradient(140deg, #F1F5F9, #94A3B8); color: #1E293B; border: 0; }
.tb-rang--3 { background: linear-gradient(140deg, #FBCFA0, #C2763A); color: #2B1608; border: 0; }
.tb-nom { min-width: 0; } .tb-nom b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-nom small { color: var(--muted-foreground); font-size: var(--text-xs); }
.tb-etat { margin-left: auto; font-size: 11px; padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap;
  background: rgba(255,255,255,.05); color: var(--muted-foreground); border: 1px solid var(--border); }
.tb-etat--en { color: var(--tb-vert); border-color: rgba(74,222,128,.35); background: rgba(74,222,128,.08); }
.tb-pos { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: end; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.25); }
.tb-pos .tb-marche { font-size: var(--text-sm); color: var(--muted-foreground); }
.tb-pos .tb-marche b { color: var(--foreground); }
.tb-latent { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.tb-pos small { grid-column: 1 / -1; color: var(--muted-foreground); font-size: var(--text-xs); }
.tb-pos .tb-pos-note { opacity: .75; }
.tb-attente { font-size: var(--text-sm); color: var(--muted-foreground); padding: 12px; border-radius: 14px; background: rgba(0,0,0,.18); }
.tb-bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; font-size: var(--text-xs); color: var(--muted-foreground); }
.tb-semaine { font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--text-sm); }
.tb-droite { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.tb-voir { color: var(--accent, #B4A8FF); font-weight: 600; white-space: nowrap; }
.tb-perles { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tb-perles i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.tb-perles i.g { background: var(--tb-vert); } .tb-perles i.p { background: var(--tb-rouge); }
.tb-note { margin: 12px 0 0; font-size: var(--text-xs); color: var(--muted-foreground); }

/* Le volet : la semaine d'un trader */
.tb-volet-fond { position: fixed; inset: 0; background: rgba(5,5,10,.6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 940; }
.tb-volet { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto; z-index: 941; padding: 22px;
  background: var(--background); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .25s ease; visibility: hidden; }
.tb-ouvert .tb-volet-fond { opacity: 1; pointer-events: auto; } .tb-ouvert .tb-volet { transform: none; visibility: visible; }
.tb-fermer { float: right; border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 18px; }
.tb-sur { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--text-2xs, 11px);
  letter-spacing: .12em; text-transform: uppercase; color: var(--tb-or); }
.tb-volet h3 { margin: 4px 0 2px; font-size: var(--text-xl); }
.tb-volet .tb-muet { color: var(--muted-foreground); font-size: var(--text-sm); margin: 4px 0; }
.tb-courbe { width: 100%; height: 110px; margin: 14px 0 6px; display: block; }
.tb-trades { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.tb-trades a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: inherit; text-decoration: none; }
.tb-trades a:hover { border-color: var(--border-strong); }
.tb-trades .h { font-variant-numeric: tabular-nums; color: var(--muted-foreground); font-size: var(--text-sm); }
.tb-trades .r { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; }
.tb-trades small { display: block; color: var(--muted-foreground); font-size: var(--text-xs); }

/* ══ LA PAGE D'UN TRADE ══════════════════════════════════════════════════════════ */
.at { max-width: 1160px; margin: 0 auto; padding: 0 0 60px; }
.at-barre { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; background: var(--background); border-bottom: 1px solid var(--border); }
.at-nav { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto; color: var(--muted-foreground); font-size: var(--text-sm); }
.at-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.at-actions form { margin: 0; }
.at-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: rgba(255,255,255,.04);
  color: var(--foreground); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: var(--text-sm); cursor: pointer; text-decoration: none; }
.at-btn:hover { border-color: var(--border-strong); }
.at-btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.at-carre { width: 36px; padding: 8px 0; }
.at-btn--or { border-color: rgba(252,211,77,.4); color: var(--tb-or); }
.at-corps { display: grid; gap: 16px; padding-top: 20px; }
.at-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.at-qui { color: var(--muted-foreground); font-size: var(--text-sm); }
.at-titre { margin: 4px 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; }
.at-quand { color: var(--muted-foreground); font-weight: 400; font-size: .6em; }
.at-issue { font-size: var(--text-sm); color: var(--muted-foreground); }
.at-resultat-bloc { text-align: right; } .at-resultat-bloc small { display: block; color: var(--muted-foreground); font-size: var(--text-xs); }
.at-resultat { font-size: clamp(30px, 4vw, 44px); font-weight: 700; font-variant-numeric: tabular-nums; }
.at-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.at-chiffres div { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.at-chiffres dt { color: var(--muted-foreground); font-size: var(--text-xs); }
.at-chiffres dd { margin: 0; font-size: var(--text-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.at-raison { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.03); border-left: 3px solid var(--accent); }
.at-raison b { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); margin-bottom: 6px; }
.at-raison p { margin: 0; line-height: 1.6; white-space: pre-line; }
.at-mention { font-size: var(--text-xs); color: var(--muted-foreground); line-height: 1.6; margin: 0; }
.at-sans-graphique { color: var(--muted-foreground); font-size: var(--text-sm); padding: 16px; border: 1px dashed var(--border-strong); border-radius: 14px; }
.at .graphique-trade { margin: 0; }


/* Les trades marquants : le contexte, toujours en tête */
.am-contexte { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid rgba(252,211,77,.3); background: rgba(252,211,77,.06); font-size: var(--text-sm); }
.am-contexte b { font-size: var(--text-md); }
.am-contexte small { color: var(--muted-foreground); flex-basis: 100%; font-size: var(--text-xs); line-height: 1.5; }
.am-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.am-liste li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); }
.am-liste li[aria-current="true"] { border-color: rgba(252,211,77,.45); }
.am-liste a { color: inherit; text-decoration: none; flex: 1 1 200px; min-width: 0; }
.am-liste form { margin: 0; }


/* ══ LE CALENDRIER (refait le 04/11/2026) ════════════════════════════════════════ */
.ac { max-width: 1040px; margin: 0 auto; display: grid; gap: 30px; }
.ac-tete { display: grid; gap: 6px; }
.ac-tete .tb-sur { display: inline-flex; gap: 6px; align-items: center; }
.ac h1 { margin: 0; font-size: clamp(28px, 4.4vw, 44px); letter-spacing: -0.02em; }
.ac-sous { margin: 4px 0 0; color: var(--muted-foreground); max-width: 64ch; line-height: 1.55; }
.ac-titre { margin: 0 0 12px; font-size: var(--text-lg); display: flex; gap: 8px; align-items: center; }
.ac-live, .ac-etiq--live i { width: 9px; height: 9px; border-radius: 50%; background: #F87171; display: inline-block;
  box-shadow: 0 0 0 0 rgba(248,113,113,.6); animation: ac-pouls 1.8s ease-out infinite; }
@keyframes ac-pouls { 70% { box-shadow: 0 0 0 9px rgba(248,113,113,0); } 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); } }
.ac-etiqs { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-etiq { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  font-size: var(--text-xs); font-weight: 600; color: var(--muted-foreground); background: rgba(255,255,255,.06); }
.ac-etiq--vert { color: var(--success); background: rgba(74,222,128,.12); }
.ac-etiq--chaud { color: #FDBA74; background: rgba(251,146,60,.14); }
.ac-etiq--live { color: #FCA5A5; background: rgba(248,113,113,.14); }
.ac-etiq--live i { width: 7px; height: 7px; }
.ac-logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none;
  background: linear-gradient(140deg, #7C6FE0, #5B4FCF); color: #fff; }
.ac-logo img { width: 100%; height: 100%; object-fit: cover; }
.ac-logo--tvni { color: #2B2010; background: linear-gradient(140deg, #FDE68A, #FCD34D 50%, #F59E0B); }
.ac-logo--grand { width: 60px; height: 60px; border-radius: 16px; }
.ac-logo--petit { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }
/* L'Arène qui court : la scène dorée. */
.ac-direct { display: grid; gap: 18px; padding: clamp(18px, 3vw, 26px); border-radius: 22px; text-decoration: none; color: inherit;
  border: 1px solid rgba(252,211,77,.45);
  background: radial-gradient(110% 140% at 0% 0%, rgba(252,211,77,.16), transparent 55%),
              radial-gradient(100% 140% at 100% 100%, rgba(139,127,224,.20), transparent 60%), var(--card);
  box-shadow: 0 24px 60px -30px rgba(245,158,11,.55); transition: transform .2s ease, border-color .2s ease; }
.ac-direct + .ac-direct { margin-top: 12px; }
.ac-direct:hover { transform: translateY(-2px); border-color: rgba(252,211,77,.75); }
.ac-direct-haut { display: flex; gap: 16px; align-items: center; }
.ac-direct-texte { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.ac-direct-texte b { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -0.01em; }
.ac-direct-texte small { display: inline-flex; gap: 6px; align-items: center; color: var(--muted-foreground); font-size: var(--text-sm); }
.ac-direct-bas { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.ac-rebours, .ac-direct-pistes { display: grid; gap: 2px; }
.ac-rebours small, .ac-direct-pistes small { font-size: var(--text-xs); color: var(--muted-foreground); }
.ac-rebours b, .ac-direct-pistes b { font-size: var(--text-xl, 1.3rem); font-variant-numeric: tabular-nums; }
.ac-direct-cta { margin-left: auto; }
/* Les prochaines : des cartes, la date en tuile. */
.ac-grille { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ac-carte, .ac-passee { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; height: 100%;
  padding: 16px; border-radius: 18px; border: 1px solid var(--border); color: inherit; text-decoration: none; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), var(--card);
  transition: transform .18s ease, border-color .18s ease; }
.ac-carte:hover { transform: translateY(-2px); border-color: rgba(252,211,77,.45); }
.ac-date { display: grid; place-items: center; width: 54px; height: 60px; border-radius: 14px; line-height: 1;
  color: #2B2010; background: linear-gradient(160deg, #FDE68A, #F59E0B); box-shadow: 0 10px 24px -12px rgba(245,158,11,.7); }
.ac-date b { font-size: 24px; font-weight: 700; }
.ac-date small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ac-date--calme { color: var(--foreground); background: rgba(255,255,255,.07); box-shadow: none; }
.ac-carte-corps { display: grid; gap: 7px; min-width: 0; }
.ac-nom { font-size: var(--text-md, 1.05rem); line-height: 1.3; }
.ac-quand, .ac-hote { display: inline-flex; gap: 6px; align-items: center; font-size: var(--text-xs); color: var(--muted-foreground); }
.ac-places { display: grid; gap: 5px; font-size: var(--text-xs); color: var(--muted-foreground); }
.ac-jauge { display: block; height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.ac-jauge > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #FCD34D, #F59E0B); }
.ac-fleche { align-self: center; color: var(--muted-foreground); transition: transform .18s ease, color .18s ease; }
.ac-carte:hover .ac-fleche { transform: translateX(3px); color: #FCD34D; }
/* Les passées : revivre la course. */
.ac-passee { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ac-passee-lien { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; color: inherit; text-decoration: none; }
.ac-passee-gestes { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-passee:hover { border-color: var(--border-strong); }
.ac-vide { color: var(--muted-foreground); font-size: var(--text-sm); margin: 0; padding: 18px; border-radius: 16px; border: 1px dashed var(--border); }
.ac-risque { font-size: var(--text-xs); color: var(--muted-foreground); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  .ac-live, .ac-etiq--live i { animation: none; }
  .ac-direct, .ac-carte, .ac-fleche { transition: none; }
}

@media (max-width: 640px) {
  .at-nav { order: 3; width: 100%; justify-content: center; margin: 0; }
  .at-actions { margin-left: auto; }
  .ac-direct-cta { margin-left: 0; width: 100%; justify-content: center; }
  .ac-fleche { display: none; }
  .ac-carte { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 560px) { .tb-latent { font-size: 22px; } .tb-chiffres { display: grid; grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .tb-carte, .tb-volet, .tb-volet-fond { transition: none; } }
