/* Grille et rythme partagés par toutes les pages publiques */
:root {
  --layout-max: 1640px;
  --layout-gutter: 60px;
  --layout-section: clamp(72px, 7vw, 108px);
  --layout-line: rgba(180, 123, 32, .22);
  --layout-radius: 16px;
}

.site-container,
.container,
.page-shell {
  width: min(var(--layout-max), calc(100% - (var(--layout-gutter) * 2))) !important;
  max-width: var(--layout-max) !important;
  margin-inline: auto !important;
}

.page-shell {
  padding-inline: 0 !important;
}

.page-intro {
  padding-top: clamp(48px, 6vw, 84px);
  padding-bottom: clamp(30px, 4vw, 54px);
}

.page-intro .inner-page-heading {
  margin: 0;
}

.page-intro--collections {
  max-width: 820px !important;
  margin: 0 0 clamp(40px, 5vw, 70px) !important;
  text-align: left !important;
}

.page-intro--collections > div:first-child {
  justify-content: flex-start !important;
}

.page-intro--collections h1 {
  margin-bottom: 18px !important;
  font-size: clamp(2.45rem, 4.2vw, 4.5rem) !important;
  font-weight: 500 !important;
  line-height: 1.04;
}

.page-intro--collections p {
  max-width: 65ch;
  margin: 0;
  color: #746d63;
  font-size: clamp(.96rem, 1.3vw, 1.08rem);
  line-height: 1.75;
}

/* En-tête : même axe et champs autonomes */
.header-actions {
  justify-self: end;
}

#header-search-form {
  position: relative;
  width: clamp(170px, 14vw, 230px);
  display: flex;
  align-items: center;
}

#header-search-input {
  width: 100%;
  height: 42px;
  padding: 0 15px 0 40px;
  border: 1px solid var(--layout-line);
  border-radius: 999px;
  outline: none;
  background: rgba(255,250,243,.78);
  color: #11110f;
  font: 500 12px Inter, sans-serif;
}

#header-search-input:focus {
  border-color: #b47b20;
  box-shadow: 0 0 0 3px rgba(180,123,32,.1);
}

#header-search-form button {
  position: absolute;
  left: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #746d63;
}

/* Rythme des pages */
body.collections-page #main-content,
body.product-detail-page #main-content,
body.about-page #main-content {
  padding-top: clamp(48px, 6vw, 84px) !important;
  padding-bottom: var(--layout-section) !important;
}

body.boutique-page #main-content {
  padding-top: 0 !important;
  padding-bottom: var(--layout-section) !important;
}

.boutique-page .page-intro + #main-content {
  align-items: flex-start;
}

.boutique-page #mobile-filter-drawer {
  width: 268px;
}

.boutique-page #mobile-filter-drawer > div {
  width: 100%;
}

.boutique-page #shop-grid {
  align-items: stretch;
}

.boutique-page #shop-grid .product-card {
  min-width: 0;
}

.collections-page #collection-grid {
  margin-bottom: 0 !important;
}

/* Les titres secondaires commencent tous sur l'axe gauche */
.about-page #main-content > section:nth-child(2) > div:first-child,
.about-page #livraison > div:first-child,
.product-detail-page #similar-section > div:first-child {
  max-width: 760px !important;
  margin-right: auto !important;
  margin-left: 0 !important;
  text-align: left !important;
}

.about-page #main-content {
  gap: 0;
}

.about-page #main-content > section + section {
  margin-top: var(--layout-section);
}

.product-detail-page #product-detail-view {
  max-width: 1380px;
  margin-right: auto;
  margin-left: 0;
}
.product-detail-page #similar-section {
  margin-top: var(--layout-section) !important;
  padding-top: clamp(42px, 5vw, 68px) !important;
  border-color: var(--layout-line) !important;
}

/* Cartes et surfaces : rayons, bordures et ombres cohérents */
.collection-card,
.collection-universe,
.commitment-card,
.product-card,
.about-page #main-content > section:nth-child(2),
.about-page #livraison > div.grid > div,
.product-detail-page #product-detail-view > div:first-child > div:first-child,
.product-detail-page #product-detail-view > div:nth-child(2) {
  border-radius: var(--layout-radius) !important;
}

.collection-universe,
.product-card,
.about-page #livraison > div.grid > div {
  border-color: var(--layout-line) !important;
}

.about-page #livraison > div.grid {
  align-items: stretch;
}

.about-page #livraison > div.grid > div {
  min-height: 100%;
}

/* Boutons et contrôles sur la même hauteur et le même rayon */
.button-primary,
.button-secondary,
.button-gold,
.btn-primary,
.btn-secondary,
.boutique-page #catalog-load-more,
.product-detail-page #detail-add-cart-btn,
.product-detail-page #detail-whatsapp-btn,
.about-page a[href*="wa.me"] {
  border-radius: 10px !important;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #b47b20 !important;
  outline-offset: 3px;
}

/* Pied de page : colonnes alignées sur la même ligne de départ */
.site-footer .footer-grid {
  align-items: start;
}

.site-footer .footer-column-title {
  min-height: 24px;
  margin-top: 0;
}

.site-footer .footer-bottom {
  gap: 24px;
}

/* Grands écrans : les cinq produits restent lisibles sans rompre l'axe */
@media (min-width: 1440px) {
  .boutique-page #shop-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

/* Tablettes */
@media (max-width: 1100px) {
  :root { --layout-gutter: 28px; }

  .header-nav {
    gap: 16px;
  }

  .nav-link {
    font-size: .78rem;
  }

  #header-search-form {
    display: none;
  }

  .boutique-page #mobile-filter-drawer {
    width: 238px;
  }
}

/* Mobiles */
@media (max-width: 767px) {
  :root {
    --layout-gutter: 16px;
    --layout-section: 64px;
  }

  .site-container,
  .container,
  .page-shell {
    width: calc(100% - 32px) !important;
  }

  .page-intro {
    padding-top: 32px;
    padding-bottom: 26px;
  }

  .page-intro--collections {
    margin-bottom: 36px !important;
  }

  body.collections-page #main-content,
  body.product-detail-page #main-content,
  body.about-page #main-content {
    padding-top: 34px !important;
    padding-bottom: 64px !important;
  }

  body.boutique-page #main-content {
    width: 100% !important;
    padding-inline: 16px !important;
  }

  .boutique-page #mobile-filter-drawer {
    width: min(88vw, 340px);
  }

  .inner-page-heading h1,
  .page-intro--collections h1 {
    font-size: clamp(2.2rem, 12vw, 3.25rem) !important;
  }

  .about-page #main-content > section + section {
    margin-top: 64px;
  }

  .about-page #main-content > section:nth-child(2) {
    padding: 26px 20px !important;
  }

  .product-detail-page #similar-section {
    margin-top: 64px !important;
  }

  .site-footer .footer-bottom {
    align-items: flex-start;
  }
}
