/*
 * Language switcher (Polylang) — keep the flag/code list on a single line,
 * matching the English header, on both desktop and mobile. The plugin's own
 * CSS sets flex-wrap: wrap on the internal list, which only breaks onto two
 * lines when the switcher doesn't have quite enough horizontal room next to
 * its siblings (menu + button) — this happens on the French header because
 * the surrounding labels are longer. Forcing nowrap here keeps it compact
 * and inline everywhere, exactly like the English version.
 */

.cpel-switcher__list {
  flex-wrap: nowrap !important;
}

.cpel-switcher__nav {
  flex-shrink: 0;
}

.cpel-switcher__item {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .cpel-switcher__list {
    flex-wrap: nowrap !important;
  }
  .cpel-switcher__nav {
    flex-shrink: 0;
  }
}


/*
 * Hide the theme's default page-title block wherever the page already has
 * its own custom Elementor hero section (id="svc-hero") with a matching
 * <h1>. Without this, the default title renders ABOVE the custom hero as a
 * redundant duplicate heading \u2014 usually a thin, barely-visible strip, but
 * on pages where the title text is long enough to wrap to two lines (most
 * often the French pages, since French service names run longer), it grows
 * tall enough to look like a stray gap of empty space above the hero.
 */
.page-header:has(+ .page-content #svc-hero) {
  display: none;
}


/*
 * The switcher's own widget wrapper was missing flex-shrink:0 (unlike its
 * neighbors \u2014 the menu and the button \u2014 which both already have it). With
 * the internal list forced to nowrap but the wrapper itself still allowed to
 * shrink, the wrapper could shrink smaller than its content needs, and the
 * overflowing content (the FR flag/label) would visually spill out and get
 * covered by the next element in the row (the Devis Gratuit / Get a Free
 * Quote button). Locking the wrapper's own flex-shrink to 0 stops that.
 */
.elementor-widget-polylang-language-switcher.elementor-element {
  flex-shrink: 0 !important;
}
