.journey-visual-summary {
  margin-bottom: 30px;
  padding: 20px;
  color: #fff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 202, 92, .22), transparent 35%),
    linear-gradient(135deg, #102a43, #174b61);
  box-shadow: 0 16px 34px rgba(16, 42, 67, .18);
}

.journey-summary-route {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  font-weight: 700;
}

.journey-summary-route span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-summary-times {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
}

.journey-summary-times small,
.journey-summary-times strong {
  display: block;
}

.journey-summary-times small {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, .65);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.journey-summary-times strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.7rem;
}

.journey-summary-duration {
  display: flex;
  padding: 8px 12px;
  align-items: center;
  gap: 7px;
  color: #dff5f0;
  font-size: .76rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.journey-summary-meta {
  display: flex;
  margin-top: 17px;
  padding-top: 14px;
  gap: 18px;
  color: rgba(255, 255, 255, .76);
  font-size: .72rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.journey-summary-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.journey-timeline {
  --time-width: 58px;
  --node-width: 30px;
}

.journey-leg-section {
  animation: journeySectionIn .45s both ease-out;
}

.journey-leg-section:nth-child(2) { animation-delay: .06s; }
.journey-leg-section:nth-child(3) { animation-delay: .12s; }
.journey-leg-section:nth-child(4) { animation-delay: .18s; }

.journey-event {
  display: grid;
  min-height: 54px;
  align-items: flex-start;
  grid-template-columns: var(--time-width) var(--node-width) minmax(0, 1fr);
  gap: 10px;
}

.journey-event > time {
  padding-top: 8px;
  color: #102a43;
  font-family: "Manrope", sans-serif;
  font-size: .9rem;
  font-weight: 800;
}

.journey-event-node {
  position: relative;
  z-index: 2;
  display: grid;
  width: 18px;
  height: 18px;
  margin: 8px auto 0;
  place-items: center;
  color: #fff;
  font-size: .48rem;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--journey-color);
  box-shadow: 0 0 0 2px var(--journey-color);
}

.journey-event-arrival .journey-event-node {
  background: #fff;
}

.journey-event-arrival.is-final .journey-event-node {
  width: 25px;
  height: 25px;
  margin-top: 5px;
  color: #fff;
  border: 0;
  background: #ff6b55;
  box-shadow: 0 5px 14px rgba(255, 107, 85, .28);
}

.journey-event-content {
  display: flex;
  min-height: 45px;
  padding: 4px 0 10px;
  flex-direction: column;
}

.journey-event-content strong {
  color: #102a43;
  font-size: .9rem;
}

.journey-event-content small {
  color: #627d72;
  font-size: .7rem;
}

.journey-event-label {
  margin-bottom: 1px;
  color: #829ab1;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.journey-scheduled {
  margin-top: 2px;
  color: #d3543e !important;
}

.journey-segment {
  display: grid;
  min-height: 105px;
  grid-template-columns: var(--time-width) var(--node-width) minmax(0, 1fr);
  gap: 10px;
}

.journey-segment-line {
  position: relative;
  grid-column: 2;
}

.journey-segment-line::before {
  position: absolute;
  content: "";
  top: -22px;
  bottom: -9px;
  left: 50%;
  width: 5px;
  border-radius: 5px;
  background: var(--journey-color);
  transform: translateX(-50%);
}

.journey-segment-card {
  display: flex;
  grid-column: 3;
  margin: 0 0 17px;
  padding: 15px;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--journey-color) 25%, #dfe9e5);
  border-radius: 16px;
  background: color-mix(in srgb, var(--journey-color) 5%, #fff);
  box-shadow: 0 7px 22px rgba(16, 42, 67, .06);
}

.journey-segment-card.is-walk {
  border-style: dashed;
  background: #f7f9f8;
}

.journey-segment-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: var(--journey-color);
}

.journey-segment-main {
  min-width: 0;
  flex: 1;
}

.journey-segment-title {
  display: flex;
  min-height: 26px;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.journey-segment-title strong {
  font-size: .86rem;
}

.journey-route-badge {
  display: inline-flex;
  min-width: 30px;
  min-height: 26px;
  padding: 4px 8px;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  border-radius: 7px;
}

.journey-realtime {
  margin-left: auto;
  color: #087f72;
  font-size: .65rem;
  font-weight: 700;
}

.journey-segment-main > p {
  margin: 5px 0 8px;
  color: #486581;
  font-size: .78rem;
}

.journey-segment-stats {
  display: flex;
  gap: 14px;
  color: #627d72;
  font-size: .69rem;
  font-weight: 700;
}

.journey-segment-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.journey-intermediate-stops {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 42, 67, .08);
}

.journey-intermediate-stops summary {
  color: #087f72;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}

.journey-intermediate-stops ol {
  position: relative;
  margin: 12px 0 2px 5px;
  padding: 0 0 0 16px;
  list-style: none;
  border-left: 2px solid color-mix(in srgb, var(--journey-color) 30%, #dfe9e5);
}

.journey-intermediate-stops li {
  position: relative;
  display: flex;
  padding: 0 0 9px 10px;
  justify-content: space-between;
  gap: 10px;
  color: #486581;
  font-size: .7rem;
}

.journey-intermediate-stops li::before {
  position: absolute;
  content: "";
  top: 5px;
  left: -20px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--journey-color);
  border-radius: 50%;
  background: #fff;
}

.journey-intermediate-stops time {
  font-weight: 700;
}

.journey-transfer-wait {
  display: grid;
  margin: 8px 0 20px calc(var(--time-width) + var(--node-width) + 20px);
  padding: 13px 15px;
  align-items: center;
  grid-template-columns: 34px 1fr auto;
  gap: 11px;
  color: #694c13;
  border: 1px solid #f1d69b;
  border-radius: 14px;
  background: #fff9e9;
  box-shadow: 0 7px 20px rgba(133, 91, 10, .07);
}

.journey-transfer-wait.is-immediate {
  color: #087f72;
  border-color: #c5e6df;
  background: #eefaf7;
}

.journey-transfer-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 202, 92, .26);
}

.journey-transfer-wait.is-immediate .journey-transfer-icon {
  background: #d9f2ec;
}

.journey-transfer-wait span,
.journey-transfer-wait strong,
.journey-transfer-wait small {
  display: block;
}

.journey-transfer-wait span {
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-transfer-wait strong {
  margin: 1px 0;
  font-size: .88rem;
}

.journey-transfer-wait small {
  opacity: .76;
  font-size: .66rem;
}

.journey-transfer-time {
  text-align: right;
}

.journey-transfer-time strong {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

@keyframes journeySectionIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .journey-summary-times strong {
    font-size: 1.35rem;
  }

  .journey-summary-duration {
    padding: 7px;
    font-size: .68rem;
  }

  .journey-summary-meta {
    gap: 8px;
    flex-direction: column;
  }

  .journey-timeline {
    --time-width: 46px;
    --node-width: 22px;
  }

  .journey-event,
  .journey-segment {
    gap: 6px;
  }

  .journey-event > time {
    font-size: .76rem;
  }

  .journey-segment-card {
    padding: 12px;
    gap: 9px;
  }

  .journey-segment-icon {
    width: 32px;
    height: 32px;
  }

  .journey-realtime {
    width: 100%;
    margin-left: 0;
  }

  .journey-transfer-wait {
    margin-left: calc(var(--time-width) + var(--node-width) + 12px);
    grid-template-columns: 30px 1fr;
  }

  .journey-transfer-time {
    grid-column: 2;
    text-align: left;
  }
}


.journey-weather {
  position: relative;
  display: grid;
  min-height: 104px;
  margin: -13px 0 30px;
  padding: 16px 84px 16px 16px;
  align-items: center;
  grid-template-columns: 52px minmax(150px, 1fr) minmax(250px, 1.25fr);
  gap: 15px;
  overflow: hidden;
  color: #123b4a;
  border: 1px solid #bde5df;
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% -20%, rgba(255, 202, 92, .28), transparent 42%),
    linear-gradient(135deg, #effbf8, #edf7fb);
  box-shadow: 0 10px 25px rgba(16, 42, 67, .08);
  animation: journeyWeatherIn .35s both ease-out;
}

.journey-weather-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #087f72;
  font-size: 1.55rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 7px 18px rgba(16, 42, 67, .08);
}

.journey-weather-main {
  min-width: 0;
}

.journey-weather-main strong,
.journey-weather-main small,
.journey-weather-kicker {
  display: block;
}

.journey-weather-kicker {
  margin-bottom: 2px;
  color: #087f72;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.journey-weather-main strong {
  color: #102a43;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.journey-weather-main small {
  margin-top: 3px;
  overflow: hidden;
  color: #5f7886;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-weather-main small span {
  margin: 0 4px;
}

.journey-weather-stats {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.journey-weather-stats div {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid rgba(8, 127, 114, .1);
  border-radius: 11px;
  background: rgba(255, 255, 255, .62);
}

.journey-weather-stats dt {
  overflow: hidden;
  color: #66818c;
  font-size: .57rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-weather-stats dd {
  margin: 2px 0 0;
  color: #164e55;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.journey-weather-source {
  position: absolute;
  right: 13px;
  bottom: 9px;
  color: #66818c;
  font-size: .55rem;
  text-decoration: none;
}

.journey-weather-source:hover {
  color: #087f72;
  text-decoration: underline;
}

.journey-weather-loading {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #587682;
  font-size: .74rem;
  font-weight: 700;
}

.journey-weather.is-loading {
  min-height: 78px;
  padding: 16px;
}

.journey-weather.is-unavailable {
  min-height: 82px;
  padding-right: 16px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.journey-weather.is-unavailable .journey-weather-icon {
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
}

@keyframes journeyWeatherIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .journey-weather {
    padding-right: 16px;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .journey-weather-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .journey-weather-stats {
    grid-column: 1 / -1;
  }

  .journey-weather-source {
    position: static;
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 430px) {
  .journey-weather-stats {
    grid-template-columns: 1fr;
  }

  .journey-weather-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}


/* Les portions parcourues à pied sont distinguées dans la colonne temporelle. */
.journey-segment.is-walk .journey-segment-line::before {
  background: repeating-linear-gradient(
    to bottom,
    var(--journey-color) 0 7px,
    transparent 7px 13px
  );
}

/* Sans attente, la marche rejoint directement le départ suivant. */
.journey-event-arrival.is-walk-connection {
  position: relative;
}

.journey-event-arrival.is-walk-connection::before {
  position: absolute;
  z-index: 0;
  content: "";
  top: 17px;
  bottom: -17px;
  left: calc(var(--time-width) + 10px + 15px);
  width: 5px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    var(--journey-color) 0 6px,
    transparent 6px 11px
  );
  transform: translateX(-50%);
}

@media (max-width: 600px) {
  .journey-event-arrival.is-walk-connection::before {
    left: calc(var(--time-width) + 6px + 11px);
  }
}


.journey-segment.is-walk.connects-next .journey-segment-line::before {
  bottom: -18px;
}
.route-inline-detail {
  min-width: 0;
  animation: journeySectionIn .25s both ease-out;
}

.journey-detail-navigation {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  margin: 0 0 14px;
  padding: 9px;
  align-items: center;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid #dce8e3;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 22px rgba(16, 42, 67, .09);
  backdrop-filter: blur(12px);
}

.journey-back-button,
.journey-sibling-buttons button {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 9px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #087f72;
  font-size: .68rem;
  font-weight: 800;
  border: 1px solid #c9e1dc;
  border-radius: 9px;
  background: #eff9f6;
}

.journey-back-button {
  justify-self: start;
}

.journey-sibling-buttons {
  display: flex;
  grid-column: 1 / -1;
  gap: 7px;
}

.journey-sibling-buttons button {
  flex: 1;
}

.journey-sibling-buttons button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.route-inline-detail .journey-weather {
  padding-right: 16px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.route-inline-detail .journey-weather-icon {
  width: 44px;
  height: 44px;
}

.route-inline-detail .journey-weather-stats,
.route-inline-detail .journey-weather-source {
  position: static;
  grid-column: 1 / -1;
}

.route-inline-detail .journey-weather-source {
  justify-self: end;
}
