/* Mode suivi (suivi.js) : bandeau du prochain repère en haut de la carte, panneau des chiffres en bas. Mêmes couleurs que la
   fenêtre « Mes randos » (mesrandos.css) ; thèmes clair et sombre par les variables de style.css. */

/* Ordinateur : sous la barre de recherche, à droite, à côté des boutons de la carte. */
.sv-bandeau {
  position: absolute;
  top: 64px;
  right: 76px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100% - 200px));
  pointer-events: none;
}
.sv-bandeau[hidden],
.sv-panneau[hidden] {
  display: none;
}
.sv-jalon,
.sv-etat {
  pointer-events: auto;
  border-radius: 14px;
  box-shadow: var(--ombre-flottant);
}
.sv-jalon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--papier);
  color: var(--encre);
}
.sv-emoji {
  flex: none;
  width: 36px;
  font-size: 26px;
  line-height: 1;
  text-align: center;
}
.sv-jalon-textes {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.sv-jalon-textes strong {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sv-jalon-textes span {
  color: var(--encre-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.sv-jalon-distance {
  flex: none;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sv-etat {
  margin: 0;
  padding: 10px 14px;
  background: var(--action-doux);
  color: var(--encre);
  font-size: 13.5px;
  font-weight: 600;
}
.sv-etat[data-type="alerte"] {
  background: #b3261e;
  color: #ffffff;
}
.sv-etat[data-type="ok"] {
  background: var(--action);
  color: var(--sur-action);
}

/* Panneau des chiffres */
.sv-panneau {
  position: absolute;
  bottom: 24px;
  left: 50%;
  z-index: 7;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 200px);
  padding: 12px 14px 10px;
  overflow-y: auto;
  border-radius: 14px;
  background: var(--papier);
  color: var(--encre);
  box-shadow: var(--ombre-flottant);
  transform: translateX(-50%);
}
.sv-tete {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.sv-tete h2 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.sv-quitter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--trait-2);
  border-radius: 8px;
  background: var(--papier);
  color: var(--encre-2);
  font-size: 12.5px;
  font-weight: 600;
}
.sv-quitter .ic-trait {
  width: 16px;
  height: 16px;
}
.sv-resume {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sv-barre {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--trait);
  overflow: hidden;
}
.sv-barre span {
  display: block;
  height: 100%;
  background: var(--action);
}
.sv-bascule {
  margin-top: 6px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--action);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
}
.sv-details h3 {
  margin: 10px 0 4px;
  font-size: 13px;
}
.sv-chiffres {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  margin: 8px 0 0;
}
.sv-chiffres dt {
  color: var(--encre-3);
  font-size: 11.5px;
}
.sv-chiffres dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sv-ensuite {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sv-ensuite li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 13.5px;
}
.sv-ensuite .sv-emoji {
  width: 28px;
  font-size: 20px;
}
.sv-ensuite small {
  color: var(--encre-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.sv-coucher,
.sv-allure,
.sv-avertissement {
  margin: 8px 0 0;
  font-size: 12.5px;
}
.sv-coucher {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--fond-ui);
}
.sv-coucher[data-niveau="serre"] {
  background: var(--peche-doux);
  color: var(--peche-encre);
}
.sv-coucher[data-niveau="apres"] {
  background: #b3261e;
  color: #ffffff;
}
.sv-allure,
.sv-avertissement {
  color: var(--encre-3);
}
.sv-profil {
  position: relative;
  margin: 8px 0 0;
}
.sv-profil svg {
  display: block;
  width: 100%;
  height: 64px;
}
.sv-profil-surface {
  fill: var(--graphe-aplat);
}
.sv-profil-ligne {
  fill: none;
  stroke: var(--graphe-profil);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.sv-profil-repere {
  stroke: var(--encre);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.sv-profil-point {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #1a73e8;
}
.sv-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13.5px;
}
.sv-confirmer {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fond-ui);
  font-size: 13px;
}
.sv-confirmer p {
  margin: 0;
}
.sv-confirmer-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.sv-action {
  padding: 6px 12px;
  border: 1px solid var(--trait-2);
  border-radius: 7px;
  background: var(--papier);
  color: var(--encre-2);
  font-size: 12.5px;
  font-weight: 600;
}
.sv-action[data-danger="true"] {
  border-color: #b3261e;
  background: #b3261e;
  color: #ffffff;
}

/* Repères et position sur la carte */
.sv-repere {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 120px;
  pointer-events: none;
}
.sv-repere-pastille {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border: 2px solid var(--action);
  border-radius: 15px;
  background: var(--papier);
  font-size: 16px;
  box-shadow: var(--ombre-1);
}
.sv-repere-prochain .sv-repere-pastille {
  border-color: var(--encre);
  transform: scale(1.2);
}
.sv-repere-nom {
  margin-top: 2px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  color: #14181b;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.sv-moi {
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.25);
}

@media (max-width: 760px) {
  /* Téléphone : le bandeau sous la barre de recherche, le panneau collé au bas de l'écran. */
  .sv-bandeau {
    top: 64px;
    right: 16px;
    left: 16px;
    width: auto;
  }
  .sv-panneau {
    bottom: 0;
    width: 100%;
    max-height: 55dvh;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }
  .sv-quitter,
  .sv-action,
  .sv-bascule {
    min-height: 44px;
  }
}
