/* Itinéraire EV — slide sheet pleine largeur (comme fiche véhicule) */

#appPage .charji-route-overlay.charji-route-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  height: 0;
  overflow: hidden;
  z-index: 540;
  pointer-events: none;
}

#appPage .charji-route-overlay.charji-route-sheet.is-open {
  inset: 0;
  top: 0;
  height: auto;
  overflow: visible;
  pointer-events: none;
}

#appPage .charji-route-overlay:not(.is-open) .charji-route-sheet__backdrop,
#appPage .charji-route-overlay:not(.is-open) .charji-route-sheet__panel {
  pointer-events: none;
}

#appPage .charji-route-overlay[aria-hidden="true"] .charji-route-sheet__panel {
  visibility: hidden !important;
  pointer-events: none !important;
}

#appPage .charji-route-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

#appPage .charji-route-overlay.is-open .charji-route-sheet__backdrop {
  opacity: 0;
}

#appPage .charji-route-cancel {
  display: none !important;
}

#appPage .charji-route-panel.charji-route-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 2;
  pointer-events: auto;
  padding: 0;
  margin: 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.16);
  max-height: min(46vh, 400px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 100%, 0);
  backface-visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#appPage .charji-route-overlay.is-open .charji-route-sheet__panel {
  transform: translate3d(0, 0, 0);
}

#appPage .charji-route-overlay.is-closing .charji-route-sheet__panel {
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}

#appPage .charji-route-overlay.is-closing .charji-route-sheet__backdrop {
  transition: opacity 0.22s ease;
}

/* Clic borne sur la carte : masquer le slide itinéraire le temps de la fiche station */
#appPage .charji-route-overlay.is-hidden-for-station-peek.is-open .charji-route-sheet__panel {
  transform: translate3d(0, 100%, 0) !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#appPage .charji-route-panel--has-hero {
  max-height: min(56vh, 460px);
}

#appPage .charji-route-panel__grab {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 0 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

#appPage .charji-route-panel__grab::before {
  content: '';
  position: absolute;
  left: -20px;
  right: -20px;
  top: -12px;
  bottom: -18px;
  z-index: 0;
}

#appPage .charji-route-panel__grab:active {
  cursor: grabbing;
}

#appPage .charji-route-panel__grab--card {
  position: relative;
  flex-shrink: 0;
  padding: 10px 0 6px;
  background: #fff;
}

#appPage .charji-route-panel__grab--card::before {
  top: -10px;
  bottom: -12px;
}

#appPage .charji-route-panel--has-hero .charji-route-panel__grab--card,
#appPage .charji-route-panel.is-loading .charji-route-panel__grab--card {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#appPage .charji-route-panel__pill {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: rgba(189, 189, 189, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.28);
}

#appPage .charji-route-panel__hero .charji-route-panel__pill {
  background: rgba(203, 213, 225, 0.94);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.38);
}

#appPage .charji-route-sheet__panel.charji-route-sheet__panel--dragging {
  transition: none !important;
  will-change: transform;
}

#appPage .charji-route-panel__hero {
  position: relative;
  flex-shrink: 0;
  height: 156px;
  background: linear-gradient(145deg, #ecfdf5 0%, #e0f2fe 55%, #f1f5f9 100%);
  overflow: hidden;
}

#appPage .charji-route-panel__hero[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__heroViewport {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#appPage .charji-route-panel__heroViewport::-webkit-scrollbar {
  display: none;
}

#appPage .charji-route-panel__heroTrack {
  display: flex;
  height: 100%;
  min-width: 100%;
}

#appPage .charji-route-panel__heroSlide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#appPage .charji-route-panel__heroSlide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#appPage .charji-route-panel__heroGrad {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0) 28%,
    rgba(15, 23, 42, 0.72) 100%
  );
}

#appPage .charji-route-panel__heroOverlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 8px 10px 10px;
  pointer-events: none;
}

#appPage .charji-route-panel__heroOverlay[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__heroOverlayRow {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

#appPage .charji-route-panel__heroOverlayText {
  flex: 1;
  min-width: 0;
}

#appPage .charji-route-panel__routeIco--hero {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
}

#appPage .charji-route-panel__routeIco--hero svg {
  display: block;
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

#appPage .charji-route-panel__heroSkel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  background: linear-gradient(
    110deg,
    #e2e8f0 8%,
    #f1f5f9 18%,
    #e2e8f0 28%
  );
  background-size: 200% 100%;
  animation: charji-route-shimmer 1.2s ease-in-out infinite;
}

#appPage .charji-route-panel.is-loading .charji-route-panel__heroSkel {
  display: block;
}

#appPage .charji-route-panel.is-loading .charji-route-panel__heroViewport,
#appPage .charji-route-panel.is-loading .charji-route-panel__heroOverlay {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes charji-route-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

#appPage .charji-route-skel-line {
  display: block;
  height: 14px;
  border-radius: 8px;
  max-width: 100%;
  background: linear-gradient(
    110deg,
    #e2e8f0 8%,
    #f1f5f9 18%,
    #e2e8f0 28%
  );
  background-size: 200% 100%;
  animation: charji-route-shimmer 1.2s ease-in-out infinite;
}

#appPage .charji-route-skel-line--short {
  display: inline-block;
  width: 42%;
  height: 12px;
  margin-right: 8px;
  vertical-align: middle;
}

#appPage .charji-route-panel__stat.charji-route-skel {
  min-height: 36px;
  padding: 0;
  border: none;
  background: transparent;
}

#appPage .charji-route-skel__bar {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 36px;
  border-radius: 8px;
  background: linear-gradient(
    110deg,
    #e2e8f0 8%,
    #f1f5f9 18%,
    #e2e8f0 28%
  );
  background-size: 200% 100%;
  animation: charji-route-shimmer 1.2s ease-in-out infinite;
}

#appPage .charji-route-panel__heroTitle {
  margin: 0 0 1px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

#appPage .charji-route-panel__heroDest {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(236, 253, 245, 0.95);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

#appPage .charji-route-panel__heroChip {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #065f46;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#appPage .charji-route-panel__heroChip[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__heroDots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}

#appPage .charji-route-panel__heroDots[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__heroDot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#appPage .charji-route-panel__heroDot.is-active {
  width: 6px;
  height: 6px;
  background: #fff;
  opacity: 1;
}

#appPage .charji-route-panel.is-loading .charji-route-panel__heroDots {
  display: none !important;
}

#appPage .charji-route-panel__card {
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

#appPage .charji-route-panel--has-hero .charji-route-panel__card {
  padding-top: 8px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

#appPage .charji-route-panel--has-hero .charji-route-panel__summary {
  display: none !important;
}

#appPage .charji-route-panel--has-hero .charji-route-panel__hero {
  border-radius: 22px 22px 0 0;
}

#appPage .charji-route-panel__hd {
  display: block;
  margin-bottom: 6px;
}

#appPage .charji-route-panel__hd[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__hd-text {
  flex: 1;
  min-width: 0;
}

#appPage .charji-route-panel__titleRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}

#appPage .charji-route-panel__routeIco {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #047857;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#appPage .charji-route-panel__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

#appPage .charji-route-panel__dest {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #0f766e;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#appPage .charji-route-panel__dest[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__summary {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.3;
  color: #475569;
}

#appPage .charji-route-panel__summary:empty {
  display: none;
}

#appPage .charji-route-panel__summary[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 6px;
}

#appPage .charji-route-panel__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  box-sizing: border-box;
}

#appPage .charji-route-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding: 4px 7px;
  min-height: 24px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e8edf2;
  font-size: 10.5px;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
  white-space: nowrap;
}

#appPage .charji-route-badge.is-muted {
  background: #f8fafc;
  border-color: #e8edf2;
  color: #64748b;
  font-weight: 600;
  font-size: 9.5px;
}

#appPage .charji-route-badge.is-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

#appPage .charji-route-badge.is-warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

#appPage .charji-route-badge.is-risk {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  font-weight: 700;
}

#appPage .charji-route-badge__k {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

#appPage .charji-route-badge.is-ok .charji-route-badge__k,
#appPage .charji-route-badge.is-warn .charji-route-badge__k {
  color: inherit;
  opacity: 0.75;
}

#appPage .charji-route-badge__v {
  font-weight: 700;
}

#appPage .charji-route-badge.charji-route-skel {
  padding: 0;
  border: none;
  background: transparent;
  width: auto;
}

#appPage .charji-route-skel__pill {
  display: block;
  width: auto;
  min-width: 40px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(
    110deg,
    #e2e8f0 8%,
    #f1f5f9 18%,
    #e2e8f0 28%
  );
  background-size: 200% 100%;
  animation: charji-route-shimmer 1.2s ease-in-out infinite;
}

#appPage .charji-route-panel__stats.charji-route-panel__stats--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 4px;
}

#appPage .charji-route-panel__stat {
  padding: 9px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

#appPage .charji-route-panel__stats--compact .charji-route-panel__stat {
  padding: 5px 4px 4px;
  border-radius: 8px;
  text-align: center;
  min-width: 0;
}

#appPage .charji-route-panel__stat.is-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

#appPage .charji-route-panel__stat.is-warn {
  background: #fff7ed;
  border-color: #fed7aa;
}

#appPage .charji-route-panel__statK {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 2px;
}

#appPage .charji-route-panel__stats--compact .charji-route-panel__statK {
  font-size: 9px;
  margin-bottom: 1px;
  letter-spacing: 0.02em;
}

#appPage .charji-route-panel__statV {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

#appPage .charji-route-panel__stats--compact .charji-route-panel__statV {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

#appPage .charji-route-panel__statSub {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
}

#appPage .charji-route-panel__statsNote {
  margin: 0 0 4px;
  font-size: 10px;
  line-height: 1.25;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#appPage .charji-route-panel__statsNote:empty {
  display: none;
}

#appPage .charji-route-panel__statsNoteItem.is-ok {
  color: #047857;
  font-weight: 700;
}

#appPage .charji-route-panel__statsNoteItem.is-warn {
  color: #c2410c;
  font-weight: 700;
}

#appPage .charji-route-panel__hint {
  margin: 0;
  font-size: 10px;
  line-height: 1.32;
  color: #64748b;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

#appPage .charji-route-panel__hint:empty {
  display: none;
  margin: 0;
}

#appPage .charji-route-panel__hint:empty + .charji-route-panel__miniLeg {
  margin-top: 0;
}

#appPage .charji-route-panel__miniLeg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 3px 0 0;
  padding: 0;
  align-items: center;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

#appPage .charji-route-panel__footPad {
  flex: 0 0 auto;
  min-height: 12px;
  width: 100%;
  pointer-events: none;
}

#appPage .charji-route-panel__miniLeg:empty {
  display: none;
}

#appPage .charji-route-panel__legItem {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.3;
  white-space: normal;
  flex-shrink: 0;
}

#appPage .charji-route-panel__legSw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

#appPage .charji-route-panel__close {
  display: none !important;
}

#appPage .charji-route-panel__chip {
  display: none !important;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

#appPage .charji-route-panel__chip[hidden] {
  display: none !important;
}

#appPage .charji-route-panel__actions {
  display: flex;
  margin: 0 0 9px;
  padding-bottom: 0;
}

#appPage .charji-route-panel.is-loading .charji-route-panel__actions {
  opacity: 0.45;
  pointer-events: none;
}

#appPage .charji-route-panel__go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  min-height: 38px;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(145deg, #22c98a 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.3);
}

#appPage .charji-route-panel__go.is-disabled,
#appPage .charji-route-panel__go:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
  background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);
}

#appPage .charji-route-panel__goInner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

#appPage .charji-route-panel__goIco {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

#appPage .charji-route-panel__refresh {
  display: none !important;
}

#appPage .charji-route-overlay.is-navigating {
  pointer-events: none;
}

#appPage .charji-route-overlay.is-navigating .charji-route-sheet__panel {
  display: none;
}

#appPage .charji-route-legend,
#appPage .charji-route-legend[hidden] {
  display: none !important;
}

#appPage .charji-route-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

#appPage .charji-route-legend__swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

#appPage .charji-route-alts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#appPage .charji-route-alt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

#appPage .charji-route-alt.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

#appPage .charji-route-alt__title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

#appPage .charji-route-alt__sub {
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.charji-route-alert-pin {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.charji-route-alert-pin__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.35);
  animation: charji-route-alert-pulse 2s ease-in-out infinite;
}

#appPage .charji-route-opts-prompt {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#appPage .charji-route-opts-prompt.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#appPage .charji-route-opts-prompt__card {
  width: min(100%, 520px);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.26);
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#appPage .charji-route-opts-prompt.is-visible .charji-route-opts-prompt__card {
  transform: translateY(0);
}

#appPage .charji-route-opts-prompt__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

#appPage .charji-route-opts-prompt__titleRow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
}

#appPage .charji-route-opts-prompt__titleIco {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #2563eb;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.14) 0%, rgba(37, 99, 235, 0.08) 100%);
}

#appPage .charji-route-opts-prompt__msg {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

#appPage .charji-route-opts-prompt__lbl {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

#appPage .charji-route-opts-prompt__sel {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 44px 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(30, 41, 59, 0.16);
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  background-color: #f8fafc;
  background-image:
    linear-gradient(45deg, transparent 50%, #475569 50%),
    linear-gradient(135deg, #475569 50%, transparent 50%),
    linear-gradient(to right, rgba(148, 163, 184, 0.32), rgba(148, 163, 184, 0.32));
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 13px) 52%,
    calc(100% - 38px) 50%;
  background-size: 5px 5px, 5px 5px, 1px 58%;
  background-repeat: no-repeat;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#appPage .charji-route-opts-prompt__sel:hover {
  border-color: rgba(37, 99, 235, 0.36);
  background-color: #fff;
}

#appPage .charji-route-opts-prompt__sel:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.64);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  background-color: #fff;
}

#appPage .charji-route-opts-prompt__selNative {
  display: none;
}

#appPage .charji-route-opts-prompt__select {
  position: relative;
  margin: 0 0 12px;
}

#appPage .charji-route-opts-prompt__selectBtn {
  width: 100%;
  text-align: left;
  padding: 11px 40px 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(30, 41, 59, 0.16);
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  background: #f8fafc;
  cursor: pointer;
  position: relative;
}

#appPage .charji-route-opts-prompt__selectBtn::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid #475569;
  border-bottom: 1.8px solid #475569;
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.16s ease;
}

#appPage .charji-route-opts-prompt__select.is-open .charji-route-opts-prompt__selectBtn {
  border-color: rgba(37, 99, 235, 0.64);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  background: #fff;
}

#appPage .charji-route-opts-prompt__select.is-open .charji-route-opts-prompt__selectBtn::after {
  transform: translateY(-35%) rotate(225deg);
}

#appPage .charji-route-opts-prompt__selectMenu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  display: none;
  max-height: 180px;
  overflow: auto;
}

#appPage .charji-route-opts-prompt__select.is-open .charji-route-opts-prompt__selectMenu {
  display: block;
}

#appPage .charji-route-opts-prompt__selectOpt {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #0f172a;
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
}

#appPage .charji-route-opts-prompt__selectOpt:hover {
  background: rgba(37, 99, 235, 0.1);
}

#appPage .charji-route-opts-prompt__selectOpt.is-selected {
  background: #2563eb;
  color: #fff;
}

#appPage .charji-route-opts-prompt__range {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

#appPage .charji-route-opts-prompt__range input[type='range'] {
  flex: 1;
}

#appPage .charji-route-opts-prompt__actions {
  display: flex;
  margin-top: 6px;
}

#appPage .charji-route-opts-prompt__go {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: #3b82f6;
  color: #fff;
}

#appPage .charji-link-skip,
.charji-link-skip {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 12px 16px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#appPage .charji-route-arrival-prompt {
  position: fixed;
  inset: 0;
  z-index: 720;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  pointer-events: auto;
}

#appPage .charji-route-arrival-prompt.is-visible {
  display: flex;
}

#appPage .charji-route-arrival-prompt__card {
  width: min(100%, 340px);
  padding: 18px 16px 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
}

#appPage .charji-route-arrival-prompt__titleRow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}

#appPage .charji-route-arrival-prompt__titleIcon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #22c98a, #059669);
  color: #fff;
}

#appPage .charji-route-arrival-prompt__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

#appPage .charji-route-arrival-prompt__msg {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

#appPage .charji-route-arrival-prompt__q {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #334155;
  text-wrap: pretty;
}

#appPage .charji-route-arrival-prompt__skip.charji-link-skip {
  margin: 6px 0 0;
  padding: 6px 12px;
  min-height: 0;
}

#appPage .charji-route-arrival-prompt__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#appPage .charji-route-arrival-prompt__ok,
#appPage .charji-route-arrival-prompt__no {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#appPage .charji-route-arrival-prompt__ok {
  background: linear-gradient(145deg, #22c98a, #059669);
  color: #fff;
}

#appPage .charji-route-arrival-prompt__no {
  background: #fef2f2;
  color: #b91c1c;
}

.charji-route-alert-pin__ic {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.45);
}

@keyframes charji-route-alert-pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.2;
  }
}

/* Marqueurs itinéraire (AdvancedMarkerElement) */
.charji-route-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.35));
}

.charji-route-pin--tap {
  pointer-events: auto !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.charji-route-pin--tap:active {
  transform: scale(0.94);
}

.charji-route-pin__lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.charji-route-pin--origin .charji-route-pin__diamond {
  width: 22px;
  height: 22px;
  background: linear-gradient(145deg, #10b981, #059669);
  transform: rotate(45deg);
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.45);
}

.charji-route-pin--dest {
  position: relative;
  width: 28px;
  height: 28px;
}

.charji-route-pin--dest .charji-route-pin__lbl {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
}

.charji-route-pin--dest .charji-route-pin__dest-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.charji-route-pin--dest .charji-route-pin__dest-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #7c3aed;
  background: rgba(124, 58, 237, 0.12);
}

.charji-route-pin--dest .charji-route-pin__dest-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #7c3aed;
  border: 2px solid #fff;
}

.charji-route-pin--charge-pick {
  position: relative;
  transform: scale(1.02);
  gap: 3px;
}

.charji-route-pin--charge-pick .charji-route-pin__charge-crown {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: #fbbf24;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(180, 83, 9, 0.32);
}

.charji-route-pin--charge-pick .charji-route-pin__charge-pick-bolt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2563eb, #1e40af);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.8), 0 5px 14px rgba(37, 99, 235, 0.5);
}

.charji-route-pin--charge {
  transform: scale(1.08);
}

.charji-route-pin--charge .charji-route-pin__bolt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.55);
}

.charji-route-pin--limit .charji-route-pin__limit-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #8b5cf6;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border: 2px solid #fff;
}

.charji-route-pin--route .charji-route-pin__mini-bolt,
.charji-route-pin--station_fast .charji-route-pin__mini-bolt {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.charji-route-pin--station_fast .charji-route-pin__mini-bolt {
  background: linear-gradient(145deg, #22c98a, #059669);
}

.charji-route-pin--station_bad .charji-route-pin__mini-bolt {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.charji-route-pin--station_busy .charji-route-pin__mini-bolt {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Détour 1 — turquoise / jaune / rose (même logique que route officielle) */
.charji-route-pin--charge-pick.charji-route-pin--v-alt1 .charji-route-pin__charge-pick-bolt {
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.88), 0 5px 14px rgba(20, 184, 166, 0.48);
}
.charji-route-pin--charge-pick.charji-route-pin--v-alt1 .charji-route-pin__charge-crown {
  background: #eab308;
  box-shadow: 0 2px 5px rgba(161, 98, 7, 0.35);
}
.charji-route-pin--v-alt1.charji-route-pin--route .charji-route-pin__mini-bolt {
  background: #14b8a6;
}
.charji-route-pin--v-alt1.charji-route-pin--station_fast .charji-route-pin__mini-bolt {
  background: linear-gradient(145deg, #14b8a6, #0d9488);
}
.charji-route-pin--v-alt1.charji-route-pin--station_bad .charji-route-pin__mini-bolt {
  background: #f472b6;
}
.charji-route-pin--v-alt1.charji-route-pin--station_busy .charji-route-pin__mini-bolt {
  background: #eab308;
}

/* Détour 2 — vert clair / pêche / corail */
.charji-route-pin--charge-pick.charji-route-pin--v-alt2 .charji-route-pin__charge-pick-bolt {
  background: linear-gradient(145deg, #4ade80, #16a34a);
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.88), 0 5px 14px rgba(74, 222, 128, 0.45);
}
.charji-route-pin--charge-pick.charji-route-pin--v-alt2 .charji-route-pin__charge-crown {
  background: #fb923c;
  box-shadow: 0 2px 5px rgba(194, 65, 12, 0.35);
}
.charji-route-pin--v-alt2.charji-route-pin--route .charji-route-pin__mini-bolt {
  background: #4ade80;
}
.charji-route-pin--v-alt2.charji-route-pin--station_fast .charji-route-pin__mini-bolt {
  background: linear-gradient(145deg, #4ade80, #22c55e);
}
.charji-route-pin--v-alt2.charji-route-pin--station_bad .charji-route-pin__mini-bolt {
  background: #fb7185;
}
.charji-route-pin--v-alt2.charji-route-pin--station_busy .charji-route-pin__mini-bolt {
  background: #fb923c;
}

@keyframes charji-route-origin-pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.25;
  }
}

/* Navigation — HUD batterie */
#appPage .charji-route-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  z-index: 609;
  pointer-events: auto;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

#appPage .charji-route-nav__battery-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#appPage .charji-route-nav__battery-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

#appPage .charji-route-nav__battery-val {
  font-size: 15px;
  font-weight: 800;
  color: #059669;
}

#appPage .charji-route-nav__soc-track {
  position: relative;
  height: 12px;
  border-radius: 8px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 6px;
}

#appPage .charji-route-nav__soc-margin {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(251, 146, 60, 0.45);
  border-radius: 8px 0 0 8px;
  pointer-events: none;
  transition: width 0.15s ease;
}

#appPage .charji-route-nav__soc-green {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(90deg, #34d399, #059669);
  border-radius: 8px 0 0 8px;
  transition: width 0.15s ease;
}

#appPage .charji-route-nav-alerts-top {
  display: none !important;
  position: fixed;
  left: 12px;
  right: 12px;
  top: max(10px, env(safe-area-inset-top, 10px));
  z-index: 650;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#appPage .charji-route-nav-alerts-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#appPage .charji-route-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  pointer-events: auto;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.18);
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

#appPage .charji-route-alert__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

#appPage .charji-route-alert__body {
  flex: 1;
  min-width: 0;
}

#appPage .charji-route-alert__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

#appPage .charji-route-alert__text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0.92;
}

#appPage .charji-route-alert--info {
  background: rgba(255, 255, 255, 0.97);
  border-color: #7dd3fc;
  color: #0c4a6e;
}

#appPage .charji-route-alert--info .charji-route-alert__icon {
  background: #e0f2fe;
  color: #0284c7;
}

#appPage .charji-route-alert--warn {
  background: rgba(255, 251, 235, 0.98);
  border-color: #fcd34d;
  color: #78350f;
}

#appPage .charji-route-alert--warn .charji-route-alert__icon {
  background: #fef3c7;
  color: #d97706;
}

#appPage .charji-route-alert--danger {
  background: rgba(255, 255, 255, 0.98);
  border-color: #fca5a5;
  color: #7f1d1d;
}

#appPage .charji-route-alert--danger .charji-route-alert__icon {
  background: #fee2e2;
  color: #dc2626;
}

#appPage .charji-route-alert--critical {
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 55%);
  border-color: #f87171;
  color: #7f1d1d;
  box-shadow: 0 12px 36px rgba(220, 38, 38, 0.22);
}

#appPage .charji-route-alert--critical .charji-route-alert__icon {
  background: #fecaca;
  color: #b91c1c;
}

/* Pédale simulation — coin gauche, au-dessus du HUD (ne couvre pas les données) */
#appPage .charji-route-sim-pedal {
  position: fixed;
  left: max(10px, env(safe-area-inset-left, 10px));
  right: auto;
  bottom: calc(198px + env(safe-area-inset-bottom, 0px));
  z-index: 607;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.92) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#appPage .charji-route-sim-pedal.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

#appPage .charji-route-sim-pedal__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 48px;
  padding: 6px 5px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(8px);
}

#appPage .charji-route-sim-pedal__tag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #2563eb;
  line-height: 1;
}

#appPage .charji-route-sim-pedal__speed {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

#appPage .charji-route-sim-pedal__val {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

#appPage .charji-route-sim-pedal__unit {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
}

#appPage .charji-route-sim-pedal__range {
  width: 38px;
  height: 56px;
  margin: 0;
  writing-mode: vertical-lr;
  direction: rtl;
  accent-color: #2563eb;
  cursor: pointer;
}

#appPage .charji-route-nav__live-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #64748b;
}

#appPage .charji-route-nav__speed {
  font-weight: 800;
  color: #0f172a;
  font-size: 12px;
}

#appPage .charji-route-nav__meta {
  text-align: right;
  flex: 1;
  line-height: 1.3;
}

#appPage .charji-route-nav__soc-slider {
  width: 100%;
  margin: 4px 0 6px;
  accent-color: #059669;
}

#appPage .charji-route-nav__hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

#appPage .charji-route-nav__stop {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
