/* The accepted contact concept, adapted for phones without changing the desktop scene. */
@media (max-width: 700px) {
  html {
    scroll-padding-top: 138px;
  }

  .site-header {
    --mobile-logo-width: 147px;
    position: sticky;
    display: flex;
    flex-direction: row;
    height: 138px;
    min-height: 138px;
    gap: 0;
    padding: 8px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left));
    border-bottom: 0;
  }

  .site-header .brand {
    position: absolute;
    top: 6px;
    left: 50%;
    width: var(--mobile-logo-width);
    max-width: var(--mobile-logo-width);
    transform: translateX(-50%);
  }

  .site-header nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobile-logo-width) minmax(0, 1fr);
    align-items: center;
    width: 100%;
    gap: 0;
    font-size: 14px;
    line-height: 1.2;
  }

  .site-header nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 8px 2px;
    border-bottom: 0;
    text-align: center;
    white-space: normal;
    text-wrap: balance;
  }

  .site-header nav a:is(:hover, :active, :focus, [aria-current="page"]) {
    border-bottom: 0;
    text-decoration: none;
  }

  .site-header nav a:first-child {
    grid-column: 1;
  }

  .site-header nav a:last-child {
    display: flex;
    grid-column: 3;
  }

  .site-header nav .nav-contact .header-fleur {
    display: none;
  }

  .site-header .contact-motto {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6px minmax(0, 1fr);
    align-items: center;
    column-gap: 9px;
    height: 20px;
    margin: 0;
    padding-inline: 12px;
    background: #d5222b;
    color: #f4efe3;
    font-size: clamp(9px, 2.8vw, 12px);
    font-weight: 700;
    letter-spacing: .075em;
    line-height: 1;
    white-space: nowrap;
  }

  .contact-motto span:first-child {
    justify-self: end;
  }

  .contact-motto span:last-child {
    justify-self: start;
  }

  .contact-motto i,
  .contact-motto i svg {
    display: block;
    width: 6px;
    height: 6px;
    line-height: 0;
  }

  .contact-motto i { opacity: .8; }

  #contact.concept-clean {
    --mobile-switch-width: clamp(134px, 38vw, 164px);
    --mobile-walking-lane-height: 140px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobile-switch-width);
    grid-template-rows: auto auto minmax(var(--mobile-walking-lane-height), 1fr) auto;
    align-items: start;
    align-content: start;
    height: auto;
    min-height: calc(100vh - 120px);
    min-height: calc(100svh - 120px);
    padding: 12px max(18px, env(safe-area-inset-right)) 20px max(18px, env(safe-area-inset-left));
    gap: 16px;
    border-top: 0;
  }

  #contact.concept-clean .contact-center-fleur {
    position: static;
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    width: 24px;
    height: auto;
    margin: 0;
    transform: none;
    filter: brightness(0) invert(1);
    opacity: .9;
    pointer-events: none;
  }

  #contact.concept-clean .contact-details {
    position: static;
    display: grid;
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  #contact.concept-clean .contact-details a {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  #contact.concept-clean .contact-details-left,
  #contact.concept-clean .contact-details-right {
    display: contents;
  }

  #contact.concept-clean .contact-mobile-heading {
    display: block;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    color: var(--cream);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
  }

  #contact.concept-clean .contact-details .contact-email-link {
    display: block;
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    padding: 5px 0;
    align-content: end;
    overflow-wrap: normal;
  }

  .contact-details .contact-email-domain {
    display: block;
    white-space: nowrap;
  }

  #contact.concept-clean .contact-details .contact-phone-link {
    grid-column: 3;
    grid-row: 2;
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
  }

  #contact.concept-clean .contact-details address {
    grid-column: 3;
    grid-row: 1;
    align-self: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    color: #c9c6be;
    font-size: 13px;
    line-height: 1.45;
    font-style: normal;
    text-align: right;
    overflow-wrap: normal;
  }

  #contact.concept-clean .contact-title {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  #contact.concept-clean .contact-heading-row,
  #contact.concept-clean .contact-info-block {
    display: none;
  }

  #contact.concept-clean .contact-brand-description {
    max-width: 43ch;
    margin: 0 auto;
    color: #c9c6be;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    text-wrap: pretty;
  }

  #contact.concept-clean .contact-columns.contact-info-row {
    display: flex;
    grid-column: 2;
    grid-row: 3;
    align-items: flex-end;
    align-self: end;
    justify-content: flex-end;
    min-width: 0;
    width: var(--mobile-switch-width);
    margin: 0;
    padding: 0;
    gap: 0;
    z-index: 2;
  }

  #contact.concept-clean .contact-info-row .footer-light-controls {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    justify-content: flex-end;
    margin: 0;
  }

  #contact.concept-clean .footer-light-dock {
    width: var(--mobile-switch-width);
  }

  #contact.concept-clean .footer-wall-switch {
    width: var(--mobile-switch-width);
    height: auto;
  }

  #contact.concept-clean .footer-street {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 4;
    min-width: 0;
    width: 100%;
    margin-top: 4px;
  }

  #contact .footer-bottom { position: relative; }
  #contact .footer-bottom > span {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }

  #contact .footer-sector-arrow-link {
    position: absolute;
    grid-area: auto;
    left: 50%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 54px;
    min-height: 44px;
    transform: translateX(-50%);
    color: #fff;
    touch-action: manipulation;
  }

  #contact .footer-sector-arrow-link svg {
    flex: none;
    width: 6.75px;
    height: 40.5px;
  }

  #contact .footer-sector-arrow-link:focus-visible {
    outline-color: #fff;
    outline-offset: 0;
  }

  #contact .streetscape-toolbar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    margin-top: 10px;
  }

  #contact .streetscape-toolbar > p {
    flex: 1 1 64px;
    min-width: 0;
  }

  #contact .streetscape-explore-label,
  #contact .streetscape-scroll-instruction {
    display: block;
    line-height: 1.4;
  }

  /* footer-paint.js moves the existing brush here; it stays beside the arrows. */
  #contact .streetscape-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
  }

  #contact .streetscape-controls :is(button, #footer-paint-toggle, #footer-paint-clear) {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  #contact #footer-mobile-light-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #4b453b;
    background: transparent;
    color: var(--cream);
  }

  #footer-mobile-light-toggle svg {
    flex: none;
    width: 26px;
    height: 26px;
    overflow: visible;
  }

  #footer-mobile-light-toggle .switch-hint-bulb {
    stroke: #fff0b6;
    animation: contact-bulb-invitation 4.8s ease-in-out infinite;
  }

  #footer-mobile-light-toggle .switch-bulb-glass {
    fill: #ffe766;
    stroke: #fff0b6;
  }

  #footer-mobile-light-toggle .switch-bulb-filament {
    stroke: #403419;
  }

  #footer-mobile-light-toggle .switch-bulb-rays {
    stroke: #ffe766;
    opacity: .85;
  }

  #contact #footer-mobile-light-toggle[aria-checked="true"] {
    border-color: #c2a372;
    background: #6f523329;
  }

  #contact #footer-mobile-light-toggle:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 3px;
  }

  /* Fit the illustrated map and the first walking panel below the sticky header. */
  #secteur.map-section {
    padding-bottom: 0;
  }

  #secteur .section-heading {
    padding: 8px 5%;
  }

  #secteur .section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 7.7vw, 30px);
    line-height: 1.08;
  }

  .walking-section {
    padding-top: 8px;
    padding-bottom: 12px;
  }

  /* Keep driving below the first walking view, with room to scroll onward. */
  .mobile-local-routes {
    min-height: calc(100vh - 120px);
    min-height: calc(100svh - 120px);
    background: #000;
  }

  /* Compact section labels let the route illustrations lead on phones. */
  .mobility-heading {
    min-height: 46px;
    padding: 8px 5%;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .mobility-heading h2 {
    margin: 0;
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.08;
    white-space: nowrap;
  }

  .escapade-heading > span {
    font-size: 12px;
    line-height: 1.2;
  }

  @media (prefers-reduced-motion: reduce) {
    #footer-mobile-light-toggle .switch-hint-bulb {
      animation: none;
      filter: drop-shadow(0 0 3px #ffcf75);
    }
  }
}

@media (max-width: 360px) {
  .site-header {
    --mobile-logo-width: 129px;
  }

  .site-header .brand {
    top: 11px;
  }

  .site-header nav {
    font-size: 13px;
  }

  #contact.concept-clean {
    --mobile-switch-width: 120px;
    --mobile-walking-lane-height: 120px;
    padding-inline: max(16px, env(safe-area-inset-left));
    column-gap: 12px;
  }

  #contact.concept-clean .contact-details {
    column-gap: 10px;
  }

  #contact.concept-clean .contact-details a,
  #contact.concept-clean .contact-details address {
    font-size: 12px;
  }

  #contact.concept-clean .contact-mobile-heading {
    font-size: 12px;
  }

  #contact.concept-clean .contact-brand-description {
    font-size: 14px;
  }
}

/* Mobile keeps only the sector link, with a small outward nudge. */
@media(max-width:700px){
  .site-header nav a.nav-contact{display:none}
  .site-header nav a[href='#secteur']{transform:translateX(-6px)}
}
