/* ============================================================
   ATLASVISION — Feuille de style
   DA identique à coachatlas.fr
   Palette : fond sombre, or #C4A15B, bleu #548CB4
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --gold:    #C4A15B;
  --gold-lt: #e0c07a;
  --blue:    #548CB4;
  --blue-lt: #6aafd8;
  --dark:    #0b0c10;
  --dark2:   #12151c;
  --dark3:   #1a1f2e;
  --dark4:   #232940;
  --text:    #d4d8e8;
  --text-lt: #f0f2f8;
  --border:  rgba(196, 161, 91, 0.25);
  --radius:  8px;
  --shadow:  0 4px 24px rgba(0,0,0,0.5);
  --trans:   0.2s ease;
  --font-ui: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ui);
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--gold-lt); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  color: var(--gold);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); }
h1 span { color: var(--blue-lt); }

p { margin-bottom: 1rem; }

/* ---------- Layout ---------- */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.section {
  padding: 60px 0 80px;
}

.divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  margin: 16px auto 20px;
  border-radius: 2px;
}

/* ---------- Navigation ---------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav__logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__logo span { color: var(--blue-lt); }

.nav__back {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--trans);
}

.nav__back:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(196, 161, 91, 0.08);
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--dark2) 0%, var(--dark) 100%);
  border-bottom: 1px solid var(--border);
}

.hero p {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer__inner {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text);
}

.footer__inner a { color: var(--gold); }
.footer__inner a:hover { color: var(--gold-lt); }


/* ============================================================
   HISTO1 — Dashboard Picks & Bans
   ============================================================ */

.histo1-root {
  display: grid;
  gap: 24px;
}

/* ---------- Meta line ---------- */
.histo1-meta {
  font-size: 0.92rem;
  color: var(--text);
}

.histo1-meta.histo1-loading {
  opacity: 0.6;
}

.histo1-error {
  color: #f87171;
}

/* ---------- Chart ---------- */
.histo1-chart {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.histo1-chart-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px 10px;
  min-height: 44px;
}

.histo1-chart-title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-lt);
  white-space: nowrap;
  text-align: center;
}

.histo1-chart-legend {
  position: absolute;
  right: 18px;
  display: flex;
  gap: 18px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text);
}

.chart-legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  flex-shrink: 0;
}

.histo1-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

/* ---------- Controls (filters + reset button) ---------- */
.histo1-controls {
  position: relative;
  z-index: 10;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.histo1-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  align-items: center;
}

/* ---------- Reset all button ---------- */
.histo1-reset-all {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 7px 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  transition: all var(--trans);
  white-space: nowrap;
  line-height: 1;
}

.histo1-reset-all:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(196, 161, 91, 0.08);
}

/* ---------- Dropdown ---------- */
.histo1-dropdown {
  position: relative;
}

.histo1-dropdown-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.histo1-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 7px 13px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1;
  transition: all var(--trans);
  white-space: nowrap;
  user-select: none;
}

.histo1-dropdown.is-hover .histo1-dropdown-trigger,
.histo1-dropdown.is-locked .histo1-dropdown-trigger {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--dark4);
}

.dd-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dd-count {
  font-size: 0.78rem;
  opacity: 0.75;
}

.dd-arrow {
  font-size: 0.7rem;
  transition: transform var(--trans);
  margin-left: 2px;
}

.histo1-dropdown.is-hover .dd-arrow,
.histo1-dropdown.is-locked .dd-arrow {
  transform: rotate(180deg);
}

/* ✕ reset button next to trigger */
.histo1-dropdown-x {
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1;
  transition: all var(--trans);
  flex-shrink: 0;
}

.histo1-dropdown-x:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(196, 161, 91, 0.12);
}

/* Dropdown panel — top: 100% keeps it flush with the trigger so moving the
   mouse from the trigger into the panel never crosses a gap and closes it. */
.histo1-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  min-width: 200px;
  max-height: 420px;
  overflow-y: auto;
}

.histo1-dropdown.is-hover .histo1-dropdown-panel,
.histo1-dropdown.is-locked .histo1-dropdown-panel {
  display: block;
}

/* Multi-column layout inside panel */
.histo1-dropdown-cols {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.histo1-dropdown-col {
  min-width: 110px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.histo1-col-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 5px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: opacity var(--trans);
}

.histo1-col-title:hover {
  opacity: 0.7;
}

/* Team-coloured column titles (draft dropdown) */
.histo1-col-title[data-team="team1"] {
  color: var(--blue-lt);
  border-bottom-color: rgba(84, 140, 180, 0.4);
}

.histo1-col-title[data-team="team2"] {
  color: #d97070;
  border-bottom-color: rgba(217, 112, 112, 0.4);
}

/* ---------- Pills (inside dropdown panels) ---------- */
.histo1-pill {
  border: 1px solid var(--border);
  background: var(--dark3);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.4;
  transition: all var(--trans);
  text-align: left;
  white-space: nowrap;
}

.histo1-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.histo1-pill.is-active {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
  font-weight: 600;
}

/* Team 1 (Blue side) active pills */
.histo1-pill[data-team="team1"].is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Team 2 (Red side) active pills */
.histo1-pill[data-team="team2"].is-active {
  background: #C46060;
  border-color: #C46060;
  color: #fff;
}

/* ---------- Table wrapper ---------- */
.histo1-table-wrap {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Horizontal scroll only on the table itself, not the bands */
.histo1-table-scroll {
  overflow-x: auto;
}

/* ---------- Table ---------- */
.histo1-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-family: var(--font-ui);
}

.histo1-table th {
  background: var(--dark3);
  color: var(--gold);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background var(--trans);
}

.histo1-table th:hover {
  background: var(--dark4);
}

.histo1-table th.is-sorted {
  color: var(--gold-lt);
}

.th-txt {
  /* label text inside <th> */
}

.sort-ic {
  font-size: 0.68rem;
  opacity: 0.45;
  margin-left: 3px;
  display: inline-block;
  transition: opacity var(--trans), color var(--trans);
}

.histo1-table th.is-sorted .sort-ic {
  opacity: 1;
  color: var(--gold);
}

.histo1-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(196, 161, 91, 0.08);
  color: var(--text);
  font-family: var(--font-ui);
}

.histo1-table tbody tr:hover {
  background: var(--dark3);
}

.histo1-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Expand / Collapse bands ---------- */
.histo1-table-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  cursor: pointer;
  background: var(--dark3);
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-ui);
  transition: background var(--trans), color var(--trans);
}

.histo1-table-band:hover {
  background: var(--dark4);
  color: var(--gold);
}

.band-arrow {
  font-size: 0.72rem;
}

/* ---------- Empty state ---------- */
.histo1-empty {
  color: var(--text);
  opacity: 0.5;
  padding: 20px;
  text-align: center;
  font-family: var(--font-ui);
}

/* ---------- Back-to-top button ---------- */
.histo1-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-ui);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
}

.histo1-back-top.is-visible {
  display: flex;
}

.histo1-back-top:hover {
  background: var(--gold-lt);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
}
