/* Alertes rattachées à chaque course */

#race-alerts-count {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  border: 1px solid rgba(243, 199, 97, .4);
  background: rgba(243, 199, 97, .07);
  border-radius: 20px;
  padding: 5px 10px;
  letter-spacing: .5px;
}

.notification-list { display: grid; gap: 7px; margin-top: 13px; }

.notification-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.notification-item:first-child { border-top: 0; padding-top: 0; }

.notification-icon {
  height: 34px;
  width: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #253322;
  color: var(--gold);
  font-weight: 900;
}

.notification-item.critical .notification-icon { background: #3a201d; color: var(--red); box-shadow: 0 0 10px rgba(255, 124, 112, .25); }

.notification-copy strong, .notification-copy span { display: block; }
.notification-copy strong { font-size: 12px; }
.notification-copy span { font-size: 10px; color: var(--muted); margin-top: 3px; }

.notification-actions { display: flex; gap: 6px; align-items: center; }

.notification-item button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s, color .18s;
  white-space: nowrap;
}

.notification-item button:hover { border-color: var(--lime); color: var(--text); }
.alert-horse-link { color: var(--lime); border-color: rgba(200, 255, 98, .3); }

.notification-item.read { opacity: .55; }

/* Section « Analyse des cotes » : graphiques baisses/hausses, mise à part. */
.odds-analysis { margin-top: 13px; }
.odds-analysis-title {
  color: var(--gold);
  margin: 0 0 9px;
}
.odds-analysis .notification-list { margin-top: 0; }

/* Menu déroulant « Surveillance des partants » (non-partant, équipement…). */
.surveillance-dropdown {
  margin-top: 13px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.surveillance-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: .3px;
}
.surveillance-dropdown > summary::-webkit-details-marker { display: none; }
.surveillance-dropdown > summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 11px;
  transition: transform .18s;
}
.surveillance-dropdown[open] > summary::before { transform: rotate(90deg); }
.surveillance-dropdown > summary > span:first-child { flex: 1; }
.surveillance-count {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  border: 1px solid rgba(243, 199, 97, .4);
  background: rgba(243, 199, 97, .07);
  border-radius: 20px;
  padding: 4px 9px;
  letter-spacing: .5px;
}
.surveillance-dropdown[open] > .notification-list { margin-top: 12px; }

/* Graphique à barres : cote de départ → cote actuelle, par cheval. */
.odds-bars { display: grid; gap: 4px; }
.ob-axis, .ob-row { display: grid; grid-template-columns: 42px 1fr 96px; align-items: center; gap: 10px; }
.ob-axis { margin-bottom: 2px; }
.ob-axis-title { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--muted-2); }
.ob-axis-track { position: relative; height: 12px; }
.ob-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 8px; color: var(--muted-2); }
.ob-tick::before { content: ""; position: absolute; left: 50%; top: 11px; width: 1px; height: 4px; background: var(--line); }

.ob-rows { display: grid; gap: 3px; max-height: 340px; overflow-y: auto; padding: 2px 0; }
.ob-row { height: 22px; border-radius: 6px; }
.ob-row:hover { background: rgba(255, 255, 255, .035); }
.ob-num { font-size: 11px; font-weight: 800; color: var(--text); }

.ob-track { position: relative; height: 100%; }
.ob-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.ob-seg { position: absolute; top: 50%; transform: translateY(-50%); height: 7px; border-radius: 4px; }
.ob-row.down .ob-seg { background: var(--lime); }
.ob-row.up .ob-seg { background: var(--red); }
.ob-row.flat .ob-seg { background: var(--muted); }
.ob-pt { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); }
.ob-pt-init { background: var(--panel); border: 1.5px solid var(--muted); z-index: 1; }
.ob-pt-cur { box-shadow: 0 0 0 2px var(--panel); z-index: 2; }
.ob-row.down .ob-pt-cur { background: var(--lime); }
.ob-row.up .ob-pt-cur { background: var(--red); }
.ob-row.flat .ob-pt-cur { background: var(--muted); }

.ob-val { font-size: 10px; color: var(--muted); text-align: right; white-space: nowrap; }
.ob-val i { font-style: normal; color: var(--muted-2); }
.ob-val b { color: var(--text); font-weight: 800; }

.ob-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 10px; color: var(--muted); }
.ob-lk { display: inline-flex; align-items: center; gap: 5px; }
.ob-key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.ob-key-init { background: var(--panel); border: 1.5px solid var(--muted); }
.ob-key-cur { background: var(--muted); }
.ob-key-down, .ob-key-up { border-radius: 2px; }
.ob-key-down { background: var(--lime); }
.ob-key-up { background: var(--red); }
.ob-legend .k-down { color: var(--lime); }
.ob-legend .k-up { color: var(--red); }

.empty-notifications { color: var(--muted); font-size: 11px; margin: 0; }

@media (max-width: 560px) {
  .notification-item { grid-template-columns: auto 1fr; }
  .notification-actions { grid-column: 2; }
}
