/* Transports dans la carte — mesures reprises des maquettes TrAutour / TrLigne / TrArret / TrDesk. */
.country-view {--tn-paper: #fff; --tn-ink: #14171C; --tn-muted: #6B7280; --tn-line: #ECEDF0; --tn-blue: #1C6EF2; --tn-grab: #DADCE1; --tn-sel: #EEF4FF; --tn-glass: rgb(255 255 255 / .78)}
html[data-atlas-theme=night] .country-view {--tn-paper: #171B22; --tn-ink: #F2F4F7; --tn-muted: #9AA3B0; --tn-line: #2A303A; --tn-blue: #6EA3FF; --tn-grab: #3A414D; --tn-sel: #1F2A3D; --tn-glass: rgb(23 27 34 / .82)}

/* Pendant les transports, rien d'autre ne recouvre la carte */
html[data-atlas-transit=open] .country-view .national-sidebar.search-hub,
html[data-atlas-transit=open] .country-view #routeDrawer,
html[data-atlas-transit=open] .country-view .place-card,
html[data-atlas-transit=open] .country-view #nationalPlaceCard {display: none!important}

.tn {position: absolute; left: 0; right: 0; bottom: 0; z-index: 45; box-sizing: border-box; max-height: 44%; display: flex; flex-direction: column;
  background: var(--tn-paper); color: var(--tn-ink); border-radius: 26px 26px 0 0; box-shadow: 0 -8px 30px rgb(16 24 40 / .12);
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom)); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.01em; font-feature-settings: "tnum"}
.tn[hidden] {display: none}
.tn[data-view=line] {max-height: 52%}
.tn-grab {display: block; flex: none; margin: 0 auto 14px; width: 38px; height: 5px; border-radius: 9px; background: var(--tn-grab)}
.tn-body {overflow: auto; overscroll-behavior: contain; min-height: 0; margin: 0 -20px; padding: 0 20px}
.tn-close {position: absolute; top: 14px; inset-inline-end: 14px; width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(120 128 140 / .14); color: var(--tn-muted); cursor: pointer}
.tn-close svg {width: 14px; height: 14px}
.tn-head {padding-inline-end: 36px}
.tn-title {margin: 0; font-size: 22px; line-height: 1.15; font-weight: 750; letter-spacing: -.02em}
.tn[data-view=stop] .tn-title {font-size: 24px}
.tn-sub {margin: 3px 0 6px; font-size: 13.5px; color: var(--tn-muted)}
.tn[data-view=stop] .tn-sub {font-size: 14px; margin-bottom: 12px}
.tn-empty {font-size: 14px; color: var(--tn-muted); margin: 12px 0}

.tn-pill {display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 28px; height: 22px; padding: 0 7px; border-radius: 7px; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0; background: #9AA1AC}
.tn-pill-big {min-width: 34px; height: 26px; font-size: 13.5px}
.tn-list {display: flex; flex-direction: column}
.tn-row {display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--tn-line); background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; min-height: 0}
.tn-row:first-child {border-top: 0}
.tn-row-main {flex: 1; min-width: 0}
.tn-row-main b {display: block; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.tn-pills {display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px}
.tn-walk {flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--tn-muted); white-space: nowrap}
.tn-walk::before {content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13' cy='4' r='2'/%3E%3Cpath d='m9 21 3-7 3 3v4M7 12l3-4 3 1 2 3'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13' cy='4' r='2'/%3E%3Cpath d='m9 21 3-7 3 3v4M7 12l3-4 3 1 2 3'/%3E%3C/svg%3E") center/contain no-repeat}
.tn-dest {padding: 11px 0}
.tn-dest-name {flex: 1; min-width: 0; font-size: 15px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.tn-chev {flex: none; width: 16px; height: 16px; background: #B5BAC4; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat}
[dir=rtl] .tn-chev {transform: scaleX(-1)}
.tn-go {display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; min-height: 52px; margin-top: 14px; border: 0; border-radius: 16px; background: var(--tn-blue); color: #fff; font: 700 16.5px/1 inherit; cursor: pointer}
.tn-go svg {width: 19px; height: 19px}

.tn-line-head {display: flex; align-items: center; gap: 10px; padding-inline-end: 36px}
.tn[data-view=line] .tn-title {font-size: 21px}
.tn-meta {display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; font-size: 13.5px; color: var(--tn-muted)}
.tn-swap {flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 0; padding: 0; border: 0; background: none; color: var(--tn-blue); font: 650 13.5px/1 inherit; cursor: pointer}
.tn-swap svg {width: 15px; height: 15px}
.tn-stops {list-style: none; margin: 0; padding: 0}
.tn-stops li {position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 34px; padding-inline-start: 30px; cursor: pointer}
.tn-stops li.near {min-height: 44px}
.tn-stops li::before {content: ""; position: absolute; inset-inline-start: 6px; top: 0; bottom: 0; width: 6px; background: var(--tn-c)}
.tn-stops li:first-child::before {top: 50%} .tn-stops li:last-child::before {bottom: 50%}
.tn-stops li::after {content: ""; position: absolute; inset-inline-start: 3px; top: 50%; width: 12px; height: 12px; margin-top: -6px; box-sizing: border-box; border-radius: 50%; background: var(--tn-paper); border: 3px solid var(--tn-c)}
.tn-stops li.end::after, .tn-stops li.near::after {inset-inline-start: 1px; width: 16px; height: 16px; margin-top: -8px}
.tn-stops li.near::after {background: var(--tn-blue); border-color: var(--tn-blue)}
.tn-stops b {font-size: 14.5px; font-weight: 500}
.tn-stops li.end b, .tn-stops li.near b {font-size: 15px; font-weight: 700}
.tn-stops small {font-size: 12.5px; font-weight: 600; color: var(--tn-blue)}
.tn-foot {margin: 10px 0 0; font-size: 12px; color: var(--tn-muted)}

/* Barre de recherche en haut, comme la maquette : la toucher quitte les transports */
.tn-top {position: absolute; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); z-index: 44; height: 50px; min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 0; border-radius: 16px;
  background: var(--tn-glass); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); box-shadow: 0 8px 24px rgb(16 24 40 / .12); color: var(--tn-muted); font: 500 16px/1 Inter, -apple-system, sans-serif; text-align: start; cursor: text}
.tn-top[hidden] {display: none}
.tn-top svg {width: 19px; height: 19px; flex: none}

/* Ordinateur : panneau à gauche (408 px), la carte partout ailleurs */
@media (min-width: 781px) {
  .tn {left: 16px; right: auto; top: 16px; bottom: auto; width: 408px; max-height: calc(100% - 120px); border-radius: 24px; padding: 20px 22px 22px; box-shadow: 0 18px 50px rgb(16 24 40 / .18), 0 0 0 1px rgb(16 24 40 / .04)}
  .tn[data-view=line] {max-height: calc(100% - 120px)}
  .tn-grab {display: none}
  .tn-body {margin: 0 -22px; padding: 0 22px}
  .tn-top {display: none}
  .tn-sub {margin-bottom: 10px}
  .tn-row {padding: 11px 12px; margin: 0 -12px; width: calc(100% + 24px); border-radius: 12px; border-top-color: var(--tn-line)}
  .tn-row:hover {background: var(--tn-sel); border-top-color: transparent}
  .tn-row:hover + .tn-row {border-top-color: transparent}
  .tn-row-main b {font-size: 15.5px}
  .tn-walk {font-size: 13px}
  .tn-walk::before {display: none}
}

/* Ligne trouvée par la recherche (« 23 », « M1 », « TGM ») */
.tn-suggest {display: flex; flex-direction: column}
.tn-suggest-row {display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--tn-line); background: none; color: var(--tn-ink); font: inherit; text-align: start; cursor: pointer; min-height: 0}
.tn-suggest-row:hover {background: var(--tn-sel)}
.tn-suggest-text {display: flex; flex-direction: column; min-width: 0}
.tn-suggest-text b {font-size: 15px; font-weight: 650}
.tn-suggest-text small {font-size: 13px; color: var(--tn-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap}

.tn-meta > span:first-child {min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}

.tn-foot-action {flex: none}
.tn-foot-action:empty {display: none}
