/* Shared mobile presentation for the public fare grids only.
   Desktop tables, prices, request URLs and the personal calculator stay intact. */
.package-table .forfait-label-mobile,
.route-table .forfait-label-mobile {
  display: none;
}

@media (max-width: 760px) {
  /* Allow the final control to scroll clear of the fixed contact bar,
     including the home-indicator area on phones. */
  html:has(body.tariffs-page),
  html:has(body.plan-daups-page) {
    scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  body.tariffs-page,
  body.plan-daups-page {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .tariffs-page .package-table-wrap {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .tariffs-page .package-table,
  .plan-daups-page .route-table {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background: transparent;
    border-collapse: separate;
    font-size: 1rem;
    line-height: 1.5;
  }

  .tariffs-page .package-table caption,
  .plan-daups-page .route-table caption {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--pine, #123b30);
    color: #f4eee2;
    font-size: .9375rem;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Keep the table headings available to assistive technology. */
  .tariffs-page .package-table thead,
  .plan-daups-page .route-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .tariffs-page .package-table tbody,
  .plan-daups-page .route-table tbody {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .tariffs-page .package-table tbody tr,
  .plan-daups-page .route-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #c7d2c2;
    border-radius: 4px;
    background: var(--paper, #f8f7f3);
  }

  .tariffs-page .package-table tbody th,
  .tariffs-page .package-table tbody td,
  .plan-daups-page .route-table tbody th,
  .plan-daups-page .route-table tbody td {
    display: block;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
  }

  .tariffs-page .package-table tbody th[scope="row"],
  .plan-daups-page .route-table tbody th[scope="row"] {
    grid-column: 1 / -1;
    width: auto;
    min-width: 0;
    margin: 0;
    color: var(--pine, #123b30);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tariffs-page .package-table tbody td:nth-child(2),
  .tariffs-page .package-table tbody td:nth-child(3),
  .plan-daups-page .route-table tbody .route-price {
    padding: 10px;
    border: 1px solid #dfe6d8;
    border-radius: 3px;
    background: #f1f5ec;
    color: var(--pine, #123b30);
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
  }

  .tariffs-page .package-table tbody td:nth-child(2)::before,
  .tariffs-page .package-table tbody td:nth-child(3)::before,
  .plan-daups-page .route-table tbody .route-price::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted, #53675d);
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.5;
  }

  .tariffs-page .package-table tbody td:last-child,
  .plan-daups-page .route-table tbody td:last-child {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: left;
  }

  .tariffs-page .package-table tbody td:last-child a,
  .plan-daups-page .route-table tbody td:last-child a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--pine, #123b30);
    border-radius: 3px;
    background: var(--pine, #123b30);
    color: #f4eee2;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    scroll-margin-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .tariffs-page .package-table tbody td:last-child a:hover,
  .plan-daups-page .route-table tbody td:last-child a:hover {
    border-color: #285747;
    background: #285747;
    color: #f4eee2;
  }

  .tariffs-page .package-table tbody td:last-child a:focus-visible,
  .plan-daups-page .route-table tbody td:last-child a:focus-visible {
    outline: 3px solid var(--gold, #b89a63);
    outline-offset: 3px;
  }

  .tariffs-page .package-table .forfait-label-desktop,
  .plan-daups-page .route-table .forfait-label-desktop {
    display: none;
  }

  .tariffs-page .package-table .forfait-label-mobile,
  .plan-daups-page .route-table .forfait-label-mobile {
    display: inline;
  }

  .tariffs-page .hire-complement-note {
    margin-top: 10px;
    font-size: .8125rem;
    line-height: 1.6;
  }
}
