.am-tv {
  --am-tv-height: 650px;
  font-family: Arial, Helvetica, sans-serif;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15,23,42,.08);
}

.am-tv * { box-sizing: border-box; }

.am-tv__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 17px 18px 13px;
  background: linear-gradient(180deg,#fff,#f8fafc);
}

.am-tv__eyebrow {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
}

.am-tv h2 {
  margin: 3px 0 0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.12;
}

.am-tv__subtitle {
  margin-top: 5px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.am-tv__headright {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.am-tv__brand {
  color: #b91c1c;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.am-tv__date {
  padding: 6px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.am-tv__tabs {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1px;
  background: #cbd5e1;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.am-tv__tabs button {
  min-height: 50px;
  padding: 9px 8px;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
  color: #334155;
  font: 900 13px/1.2 Arial,Helvetica,sans-serif;
  cursor: pointer;
}

.am-tv__tabs button.is-active {
  background: #b91c1c;
  color: #fff;
}

.am-tv__stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.am-tv__stats > div {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}

.am-tv__stats span {
  display: block;
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.am-tv__stats strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}

.am-tv__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.am-tv__toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
}

.am-tv__toolbar select,
.am-tv__toolbar button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.am-tv__toolbar button {
  margin-left: auto;
  cursor: pointer;
  font-weight: 800;
}

.am-tv__mapwrap { position: relative; }

.am-tv__map {
  width: 100%;
  height: var(--am-tv-height);
  min-height: 430px;
  background: #e5e7eb;
}

.am-tv__loading {
  position: absolute;
  z-index: 1000;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(15,23,42,.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.am-tv__loading.is-error { background: rgba(153,27,27,.96); }

.am-tv__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.am-tv__foot strong { color: #b91c1c; }

.am-tv-marker {
  background: transparent !important;
  border: 0 !important;
}

.am-tv-marker__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 27px;
  padding: 0 6px;
  border: 2px solid rgba(255,255,255,.96);
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,.38);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.am-tv-legend {
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 8px rgba(0,0,0,.2);
  font: 11px/1.45 Arial,Helvetica,sans-serif;
}

.am-tv-legend strong {
  display: block;
  margin-bottom: 4px;
}

.am-tv-legend div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.am-tv-legend i {
  display: inline-block;
  width: 17px;
  height: 9px;
  border-radius: 2px;
}

.am-tv-popup { min-width: 255px; color: #0f172a; }
.am-tv-popup__title { font-size: 16px; font-weight: 900; }
.am-tv-popup__id { margin: 1px 0 8px; color: #64748b; font-size: 10px; }

.am-tv-popup__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  font-size: 11px;
}

.am-tv-popup__grid strong { text-align: right; }

.am-tv-popup__meta {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 9px;
  line-height: 1.45;
  text-transform: capitalize;
}

@media (max-width: 700px) {
  .am-tv__head { padding: 13px 12px 10px; }
  .am-tv h2 { font-size: 20px; }
  .am-tv__brand { font-size: 11px; }
  .am-tv__date { font-size: 9px; }
  .am-tv__tabs { grid-template-columns: 1fr; }
  .am-tv__stats { grid-template-columns: 1fr; }
  .am-tv__toolbar { flex-wrap: wrap; }
  .am-tv__toolbar button { margin-left: 0; }
  .am-tv__foot { flex-direction: column; gap: 3px; }
}

/* v1.0.1 — contrôle de densité */
.am-tv__toolbar .js-density {
  min-width: 128px;
  font-weight: 800;
}

.am-tv__toolbar .js-filter {
  min-width: 108px;
}

@media (max-width: 700px) {
  .am-tv__toolbar label {
    flex: 1 1 145px;
    justify-content: space-between;
  }

  .am-tv__toolbar select {
    flex: 1 1 auto;
    min-width: 0;
  }
}
