/* Header commun et prévention des débordements horizontaux */
html, body { overflow-x: hidden; }

.site-header-nav {
  width: 100%;
  max-width: 80rem;
  min-height: 5rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}
.site-header-brand { display: flex; flex: 0 0 auto; flex-direction: column; line-height: 1; color: #1C1209; text-decoration: none; }
.site-header-script { font-family: 'Great Vibes', cursive; font-size: 2.25rem; white-space: nowrap; }
.site-header-subtitle { margin-top: -0.2rem; color: #9D7229; font-family: 'Playfair Display', serif; font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; white-space: nowrap; }
.site-header-menu { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: clamp(.65rem, 1.4vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
.site-header-link { color: #6B5744; font-family: Montserrat, sans-serif; font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-decoration: none; white-space: nowrap; }
.site-header-link:hover, .site-header-link.is-active { color: #9D7229; }
.site-header-cta, .site-header-mobile-cta { display: inline-flex; align-items: center; justify-content: center; background: #9D7229; color: #fff; font-family: Montserrat, sans-serif; font-size: .7rem; font-weight: 600; letter-spacing: .08em; padding: .7rem 1rem; text-decoration: none; white-space: nowrap; }
.site-header-cta:hover, .site-header-mobile-cta:hover { background: #1C1209; }
.site-header-toggle { display: none; margin-left: auto; border: 0; padding: .5rem; background: transparent; cursor: pointer; }
.site-header-toggle span { display: block; width: 1.75rem; height: 2px; margin: .35rem 0; background: #1C1209; }
.site-header-mobile-menu { display: none; }

/* Le menu horizontal est réservé aux vrais écrans desktop. */
@media (max-width: 63.9375rem) {
  .site-header-nav { padding: 0 1rem; }
  .site-header-menu { display: none; }
  .site-header-toggle { display: block; }
  .site-header-mobile-menu.is-open {
    display: block;
    position: absolute;
    top: 5rem;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .75rem 1rem 1rem;
    background: #FAF8F5;
    border-top: 1px solid #EBD9CE;
    border-bottom: 1px solid #EBD9CE;
    box-shadow: 0 1rem 2rem rgba(28,18,9,.08);
  }
  .site-header-mobile-menu ul { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
  .site-header-mobile-menu .site-header-link {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    border-bottom: 1px solid rgba(157,114,41,.12);
    padding: .55rem .2rem;
    font-size: .95rem;
    letter-spacing: .035em;
  }
  .site-header-mobile-cta { width: 100%; min-height: 3rem; margin-top: .75rem; font-size: .8rem; }
  body.site-menu-open { overflow: hidden; }
}

@media (max-width: 30rem) {
  .site-header-script { font-size: 1.95rem; }
  .site-header-subtitle { font-size: .58rem; letter-spacing: .18em; }
}

.gluten-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
  min-height: 3rem;
}

@media (max-width: 40rem) {
  .gluten-cta { width: 100%; }
}

/* Bandeau de consentement analytics */
#aa-cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 70rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: #1C1209;
  color: #FAF8F5;
  box-shadow: 0 0.75rem 2rem rgba(28,18,9,.25);
  font-family: Montserrat, sans-serif;
  font-size: .78rem;
  line-height: 1.5;
}
#aa-cookie-banner strong { color: #F5EDD8; font-family: 'Playfair Display', serif; font-size: 1rem; }
#aa-cookie-banner p { margin: .2rem 0 0; color: rgba(250,248,245,.75); }
#aa-cookie-banner a { color: #E7C98A; text-decoration: underline; }
.aa-cookie-actions { display: flex; flex-shrink: 0; gap: .5rem; }
.aa-cookie-actions button, #aa-cookie-settings {
  border: 1px solid #9D7229;
  padding: .65rem .85rem;
  background: transparent;
  color: #FAF8F5;
  cursor: pointer;
  font: 600 .7rem Montserrat, sans-serif;
  letter-spacing: .04em;
}
.aa-cookie-actions button:last-child { background: #9D7229; }
#aa-cookie-settings { margin-top: 1rem; background: transparent; color: rgba(250,248,245,.65); border-color: rgba(250,248,245,.35); }
@media (max-width: 40rem) {
  /* Sur mobile, le bandeau doit rester visible sans masquer le CTA de la page. */
  #aa-cookie-banner {
    flex-direction: row;
    align-items: center;
    gap: .65rem;
    padding: .7rem .8rem;
    font-size: .68rem;
    line-height: 1.35;
  }
  #aa-cookie-banner > div:first-child { min-width: 0; }
  #aa-cookie-banner strong { font-size: .88rem; }
  #aa-cookie-banner p { margin-top: .15rem; line-height: 1.35; }
  .aa-cookie-actions { gap: .35rem; }
  .aa-cookie-actions button {
    min-height: 2.75rem;
    padding: .55rem .65rem;
    font-size: .68rem;
    white-space: nowrap;
  }

  /* Les pages longues ont un CTA fixe en bas : le bandeau cookies doit rester au-dessus. */
  body:has(.sticky-cta-mobile) #aa-cookie-banner,
  body.has-mobile-conversion-bar #aa-cookie-banner { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}

/* Barre de conversion commune aux pages commerciales sur mobile. */
.mobile-conversion-bar { display: none; }

@media (max-width: 63.9375rem) {
  body.has-mobile-conversion-bar {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom)) !important;
  }
  body.has-mobile-conversion-bar .sticky-cta-mobile { display: none !important; }
  .mobile-conversion-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    min-height: 3.5rem;
    padding-bottom: env(safe-area-inset-bottom);
    background: #1C1209;
    box-shadow: 0 -.45rem 1.5rem rgba(28,18,9,.16);
  }
  .mobile-conversion-bar a {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .75rem .65rem;
    color: #fff;
    font: 600 .76rem Montserrat, sans-serif;
    letter-spacing: .1em;
    text-decoration: none;
    text-transform: uppercase;
  }
  .mobile-conversion-bar a:first-child {
    border-right: 1px solid rgba(255,255,255,.18);
  }
  .mobile-conversion-bar a:last-child { background: #9D7229; }
}

/* Parcours de devis : priorité au formulaire sur mobile. */
.contact-form-step[hidden] { display: none !important; }
#form-title { scroll-margin-top: 6.25rem; }
.contact-form-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: #6B5744;
  font: 600 .72rem Montserrat, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-form-progress::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: #EBD9CE;
}
.contact-step-actions { display: flex; gap: .75rem; }
.contact-step-actions button { min-height: 3rem; }

@media (max-width: 47.9375rem) {
  .contact-hero { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .contact-hero nav { margin-bottom: 1.25rem !important; }
  .contact-hero h1 { font-size: clamp(2.5rem, 12vw, 3rem) !important; line-height: 1 !important; }
  .contact-hero > p:last-child { font-size: 1rem !important; }
  .contact-layout-wrap { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .contact-layout { gap: 3rem !important; }
  .contact-form-column { order: 1; }
  .contact-info-column { order: 2; }

  /* Des titres plus courts gardent le CTA visible sur les petits téléphones. */
  .mobile-sales-hero { min-height: auto !important; padding-top: 2.75rem; padding-bottom: 2.75rem; }
  .mobile-sales-hero h1 {
    font-size: clamp(2.35rem, 11.5vw, 3rem) !important;
    line-height: 1.02 !important;
    margin-bottom: 1.15rem !important;
  }
  .mobile-sales-hero p:not(:first-child) { font-size: 1rem !important; line-height: 1.65 !important; }
  .mobile-sales-hero .mobile-hero-actions a {
    display: flex !important;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: .75rem 1rem !important;
    font-size: .78rem !important;
    text-align: center;
  }
  .hero .btn {
    min-height: 3rem;
    font-size: .78rem !important;
    letter-spacing: .12em !important;
  }
}
