/*
 * GATARD Pro Pages 1.12.51 — content resilience, preserving the current design.
 * No theme/header/footer/slider selector, image sizing, font family or colour.
 * Existing columns, gutters, section spacing and BO typography remain in charge.
 */

/* A long label must not force a grid or flex column wider than its container. */
#gatard-home .gatard-home__story-grid > *,
#gatard-home .gatard-home__locations-grid > *,
#gatard-home .gatard-home__event-card > *,
#gatard-home .gatard-home__menu-card-head,
#gatard-home .gatard-home__feature > div,
#gatard-home .gatard-home__value,
#gatard-carte .gatard-carte__cards > *,
#gatard-carte .gatard-carte__card-head,
#gatard-carte .gatard-carte__food-tile,
#gatard-carte .gatard-carte__list-item > *,
#gatard-locations .gatard-planning__intro > *,
#gatard-locations .gatard-planning__agenda-head > *,
#gatard-locations .gatard-planning__body,
#gatard-events .gatard-events__feature-card > strong,
#gatard-events .gatard-events__feature-card > p,
#gatard-events .gatard-events__quicknav-copy,
#gatard-events .gatard-project-v3__content,
#gatard-gallery .gatard-gallery__section-head > *,
#gatard-gallery .gatard-gallery__moments-copy,
#gatard-contact-page .gatard-contact-main-grid--v3 > *,
#gatard-contact-page .gatard-contact-sidebar__card > div {
  min-width: 0;
}

/* Readable wrapping for BO text, including long addresses and compound words. */
#gatard-home .gatard-home__story-excerpt,
#gatard-home .gatard-home__location-card h3,
#gatard-home .gatard-home__location-card p,
#gatard-home .gatard-home__value p,
#gatard-carte .gatard-carte__food-tile strong,
#gatard-carte .gatard-carte__list-item strong,
#gatard-carte .gatard-carte__note p,
#gatard-locations .gatard-planning__body h3,
#gatard-locations .gatard-planning__body p,
#gatard-events .gatard-events__feature-card > p,
#gatard-events .gatard-events__quicknav-copy strong,
#gatard-gallery .gatard-gallery__section-head h2,
#gatard-contact-page .gatard-contact-sidebar__card strong {
  overflow-wrap: break-word;
}

#gatard-contact-page a[href^="mailto:"],
#gatard-contact-page .gatard-contact-sidebar__card small {
  overflow-wrap: anywhere;
}

/* Fields stay inside their own column without changing the form grid. */
#gatard-contact-page input:not([type="checkbox"]):not([type="radio"]),
#gatard-contact-page select,
#gatard-contact-page textarea {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1199.98px) {
  /* Keep buttons' current padding and appearance; let long labels grow vertically. */
  #gatard-home#gatard-home .gatard-home__button,
  #gatard-carte#gatard-carte .gatard-carte__button,
  #gatard-locations#gatard-locations .gatard-locations__hero-btn,
  #gatard-locations#gatard-locations #gatard-planning .gatard-planning__route,
  #gatard-events#gatard-events .gatard-events__btn,
  #gatard-events#gatard-events .gatard-project-v3__cta,
  #gatard-gallery#gatard-gallery .gatard-gallery__show-all,
  #gatard-contact-page#gatard-contact-page .gatard-contact-hero-v3__btn,
  #gatard-contact-page#gatard-contact-page .gatard-contact-submit,
  #gatard-contact-page#gatard-contact-page .gatard-contact-sidebar__card a.btn {
    max-width: 100% !important;
    height: auto !important;
    white-space: normal !important;
    overflow-wrap: break-word;
    line-height: 1.35 !important;
    text-align: center;
  }

  #gatard-home#gatard-home .gatard-home__button-icon,
  #gatard-locations#gatard-locations .gatard-locations__hero-btn .gatard-icon,
  #gatard-events#gatard-events .gatard-events__btn .gatard-icon,
  #gatard-contact-page#gatard-contact-page .gatard-contact-sidebar__icon {
    flex-shrink: 0;
  }
}

@media (max-width: 767.98px) {
  /* Fixed maxima used to clip a card when its BO title wrapped over more lines. */
  body.page-index #gatard-home .gatard-home__menu-card {
    max-height: none !important;
  }

  #gatard-contact-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
  #gatard-contact-page select,
  #gatard-contact-page textarea {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 359.98px) {
  /* Preserve the agenda's desktop/tablet layout; protect narrow phone screens. */
  #gatard-locations #gatard-planning .gatard-planning__agenda .gatard-planning__body {
    padding-inline: 15px;
  }
}
