/* Global responsive/autofit safeguards. Loaded last on every page. */
:root {
  --autofit-page-x: clamp(18px, 5vw, 60px);
  --autofit-touch: 44px;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

:where(main, section, article, header, footer, nav, aside, form, fieldset, div, ul, ol, li, table, thead, tbody, tr, td, th, p, h1, h2, h3, h4, h5, h6) {
  min-width: 0;
}

:where(p, li, label, td, th, h1, h2, h3, h4, h5, h6, a, button, span) {
  overflow-wrap: break-word;
}

:where(button, a, input, select, textarea) {
  font: inherit;
  max-width: 100%;
}

:where(.hero-btn, .histoire-cta, .service-cta-link, .pro-cta .cta-btn, .load-more-btn, .btn-request, .success-btn-primary, .success-btn-secondary, .checkout-empty a, .wish-empty a, .wish-card-add, .form-submit, .newsletter-form button, .cookie-btn, .cart-sidebar-checkout, .cart-sidebar-continue, .catalog-back, .catalog-filter-chip, .filter-btn, .qo-submit, .btn-quick-offer, .btn-add-cart, .nav-cta) {
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-align: center;
}

:where(.hero-btn, .histoire-cta, .service-cta-link, .pro-cta .cta-btn, .load-more-btn, .btn-request, .success-btn-primary, .success-btn-secondary, .checkout-empty a, .wish-empty a, .wish-card-add, .form-submit, .newsletter-form button, .cookie-btn, .cart-sidebar-checkout, .cart-sidebar-continue, .qo-submit, .btn-quick-offer, .btn-add-cart) {
  min-height: var(--autofit-touch);
  align-items: center;
  justify-content: center;
}

/* Header: collapse before text and actions can clip. */
nav {
  max-width: 100vw;
  gap: clamp(10px, 1.8vw, 28px);
}

nav .nav-logo {
  flex: 0 1 auto;
  min-width: 0;
}

nav .nav-logo img {
  width: auto;
  max-width: min(42vw, 300px);
  max-height: clamp(72px, 12vw, 120px);
  object-fit: contain;
}

nav.scrolled .nav-logo img,
.nav-logo img.shrink {
  max-height: clamp(68px, 10vw, 110px);
}

.nav-links {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  row-gap: 10px;
}

.nav-links a {
  line-height: 1.45;
}

.nav-cta {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(42vw, 270px);
}

@media (max-width: 1280px) {
  .nav-links,
  .nav-cta[data-open-cart],
  .mob-lang-inline {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }
}

/* Home hero: use min-height so zoomed text grows the section instead of clipping the CTA. */
#hero {
  height: auto !important;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(112px, 14vh, 168px) var(--autofit-page-x) clamp(44px, 8vh, 96px);
  align-items: center;
}

@supports (height: 100dvh) {
  #hero {
    min-height: 100dvh;
  }
}

#hero-video,
.hero-overlay {
  height: 100%;
  min-height: 100%;
}

.hero-content {
  width: min(100%, 920px);
  max-width: 100%;
  gap: clamp(10px, 2.2vh, 22px) !important;
  padding: 0 !important;
  margin: auto;
}

.hero-logo {
  width: clamp(170px, 24vw, 360px) !important;
  max-width: min(70vw, 360px) !important;
  max-height: clamp(86px, 18vh, 180px);
  object-fit: contain;
}

.hero-tagline {
  max-width: 100%;
  font-size: clamp(0.56rem, 1.5vmin, 0.7rem) !important;
  letter-spacing: clamp(0.14em, 0.55vw, 0.44em) !important;
  line-height: 1.45;
}

.hero-headline {
  max-width: 100%;
  font-size: clamp(2.35rem, 8vmin, 5.4rem) !important;
  line-height: 1.05 !important;
}

.hero-sub {
  max-width: min(640px, 100%) !important;
  font-size: clamp(0.72rem, 1.75vmin, 0.88rem) !important;
  line-height: clamp(1.45, 2.35vmin, 1.8) !important;
}

.hero-btn {
  display: inline-flex !important;
  width: min(100%, 360px);
  padding: clamp(12px, 1.9vmin, 15px) clamp(22px, 4vw, 46px) !important;
  letter-spacing: clamp(0.12em, 0.65vw, 0.28em) !important;
}

@media (max-height: 760px) and (min-width: 901px) {
  #hero {
    padding-top: clamp(72px, 12vh, 120px);
    padding-bottom: 32px;
  }

  .hero-logo {
    width: clamp(140px, 18vw, 260px) !important;
    max-height: clamp(72px, 16vh, 125px);
  }

  .hero-content {
    gap: clamp(8px, 1.7vh, 14px) !important;
  }

  .hero-headline {
    font-size: clamp(2.25rem, 7.8vmin, 4.4rem) !important;
  }

  .hero-sub {
    line-height: 1.55 !important;
  }
}

@media (max-width: 900px) {
  #hero {
    padding: 112px 20px 44px;
  }

  .hero-headline {
    font-size: clamp(2.1rem, 12vw, 3.6rem) !important;
  }

  .hero-logo {
    width: clamp(150px, 48vw, 220px) !important;
  }

  .hero-btn {
    width: min(100%, 360px);
  }
}

@media (max-width: 420px) {
  .hero-tagline,
  .page-header-label,
  .section-label,
  .catalog-kicker,
  .filter-btn,
  .catalog-filter-chip,
  .load-more-btn,
  .hero-btn,
  .nav-cta {
    letter-spacing: 0.12em !important;
  }
}

/* Shared page structures. */
:where(.page-header, .about-hero, .pro-hero, .contact-hero, .service, .pro-cta, .form-section, .info-section, #newsletter, .valeurs-section, .wish-page, .checkout-page, .toolbar, .product-grid, .load-more-wrap) {
  max-width: 100%;
}

:where(.page-header, .about-hero, .pro-hero, .contact-hero) {
  padding-left: var(--autofit-page-x) !important;
  padding-right: var(--autofit-page-x) !important;
}

:where(.footer-top, .catalog-stepbar, .toolbar-top, .modal-actions, .success-actions, .newsletter-form, .cookie-actions, .histoire-numbers, .navy-icons, .mf, .acts, .tb, .bar) {
  min-width: 0;
}

.newsletter-form {
  min-width: 0;
}

.newsletter-form input {
  min-width: 0;
}

@media (max-width: 620px) {
  .newsletter-form,
  .cookie-actions,
  .modal-actions,
  .success-actions,
  .mf {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .newsletter-form button,
  .cookie-btn,
  .success-btn-primary,
  .success-btn-secondary,
  .mf .btn {
    width: 100%;
  }
}

/* Collection modal and dynamic panels must scroll instead of hiding actions. */
.mobile-menu,
.modal-overlay,
.cookie-modal,
.cart-sidebar,
.mb {
  max-height: 100dvh;
}

.mobile-menu {
  overflow-y: auto !important;
  padding: clamp(72px, 10vh, 110px) 24px 34px;
}

.modal-overlay,
.mb {
  overflow-y: auto;
}

.modal,
.mx,
.cookie-modal-card {
  max-height: min(92dvh, 920px) !important;
}

.modal-content,
.cart-sidebar-items,
.side,
.sb,
.sb-nav {
  -webkit-overflow-scrolling: touch;
}

.cart-sidebar {
  max-width: 100vw !important;
}

.cart-sidebar-header,
.cart-sidebar-footer {
  padding-left: clamp(18px, 6vw, 30px) !important;
  padding-right: clamp(18px, 6vw, 30px) !important;
}

.cart-sidebar-title {
  min-width: 0;
}

/* Admin/editor utility layouts. */
.aw.show,
.mn,
.ct-area,
.tw,
.fr,
.tb,
.bar,
.wrap,
.frame-wrap {
  min-width: 0;
}

.tw {
  overflow-x: auto;
}

.tb,
.bar {
  gap: 10px;
}

.acts {
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .tb,
  .bar {
    flex-wrap: wrap;
    height: auto !important;
    min-height: 48px;
  }

  body:has(.bar) {
    height: auto !important;
    min-height: 100dvh;
    overflow: auto !important;
  }

  .wrap {
    height: auto !important;
    min-height: calc(100dvh - 96px);
    flex-direction: column;
  }

  .frame-wrap {
    min-height: 65dvh;
  }

  .hint {
    position: static !important;
    flex-wrap: wrap;
  }
}
