:root {
  --color1: #575f8c;
  --color1-125: #414769;
  --color1-150: #2c3046;
  --color1-25: #d5d7e2;
  --color1-bw: rgba(255, 255, 255, 0.9);
  --color2: #c6ac8f;
  --color2-125: #95816b;
  --bg: #eeeff5;
  --text: #1a1a1a;
  --muted: rgba(0, 0, 0, 0.55);
  --accent: var(--color1);
  /* Aligné MINERVA (next/font Geist + Geist Mono) */
  --font-geist-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-geist-mono: "Geist Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-geist-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-geist-sans);
  font-weight: 700;
  color: var(--color1-150);
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

.catalogue-page.wrap {
  max-width: 1260px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* En-tête commun (toutes les pages) : bannière + menu */
.site-header.site-header--banner {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* Menu sous la bannière */
.site-nav {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0.65rem 0;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-nav a {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover { text-decoration: underline; }

.brand {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-geist-sans);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color1);
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
}

.brand span {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand img {
  flex-shrink: 0;
  height: 60px;
  width: auto;
  max-height: 60px;
}

/* Logo + titre en haut, centrés ; largeur fixe 70 % de la photo */
.home-hero__brand {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.75rem;
  background: none;
  pointer-events: none;
}

.home-hero__brand .brand {
  box-sizing: border-box;
  width: 70%;
  max-width: 100%;
  container-type: inline-size;
  justify-content: center;
  color: #fff;
  gap: 0.35em;
  /* Taille liée à la largeur du bloc (donc à la photo), pas au viewport */
  font-size: max(0.85rem, 8cqi);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.home-hero__brand .brand img {
  width: auto;
  height: 1.45em;
  max-width: 42%;
  max-height: none;
  flex-shrink: 0;
  object-fit: contain;
}

/* Navigateurs sans requêtes de conteneur : repli fluide sur la largeur fenêtre */
@supports not (container-type: inline-size) {
  .home-hero__brand .brand {
    font-size: clamp(0.85rem, 4.2vw, 2rem);
  }

  .home-hero__brand .brand img {
    height: clamp(2.5rem, 9vw, 4.5rem);
    max-width: 42%;
  }
}

.home-hero__brand .brand span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
}

.main { padding: 2rem 0 3rem; }

h1 { margin-top: 0; font-size: 1.75rem; }

.lead { font-size: 1.125rem; color: var(--muted); }

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-geist-sans);
  font-weight: 700;
  background: var(--color1);
  color: var(--color1-bw);
  text-decoration: none;
  border-radius: 5px;
  border: 0;
  text-align: center;
}

.btn:hover { filter: brightness(1.08); }

.btn-outline {
  background: transparent;
  color: var(--color1);
  border: 1px solid var(--color1);
}

.btn-outline:hover {
  background: var(--color1);
  color: var(--color1-bw);
}

.btn-block { display: block; width: 100%; }

.meta { color: var(--muted); font-size: 0.9rem; }

/* Catalogue */
.catalogue-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin: 0.25rem 0 1.25rem;
}

.catalogue-stock {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

.catalogue-updated {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
}

/* Bannière — pleine largeur écran, hauteur max 400 px ; cover (logo = 70 % de ce cadre) */
.site-header--banner .home-hero {
  margin: 0;
  width: 100%;
  max-width: none;
  background: transparent;
}

.site-header--banner .home-hero__media {
  position: relative;
  /* Pleine largeur viewport même si un ancêtre est plus étroit */
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  right: 50%;
  /* Ratio source 1024×433 ; plafond 400 px de haut */
  height: min(400px, calc(100vw * 433 / 1024));
  max-height: 400px;
  overflow: hidden;
  line-height: 0;
}

.site-header--banner .home-hero__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

/* Pillars */
.home-pillars {
  padding: 2.5rem 0;
}

.home-pillars__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 992px) {
  .home-pillars__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .home-pillars__grid { grid-template-columns: 1fr; }
}

.home-pillar {
  text-align: center;
}

.home-pillar__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.home-pillar h2 {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
}

.home-pillar__body {
  font-size: 0.95rem;
  color: var(--muted);
  text-align: left;
}

.home-pillar__body ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.home-pillar__cta {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.home-pillar__cta a {
  color: var(--color1);
  font-weight: 700;
}

/* Practical block — pleine largeur : pas de colonne étroite sur grand écran */
.home-practical {
  padding: 2rem 0;
  text-align: center;
}

.home-practical__inner {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  box-sizing: border-box;
}

.home-practical h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.home-practical__sep {
  width: 100px;
  height: 3px;
  background: var(--color1);
  margin: 0 auto 1.5rem;
  border: 0;
}

.home-practical__text {
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.home-practical__hours-label {
  font-weight: 700;
  color: var(--color1-150);
  margin-top: 1rem;
}

.home-practical__hours-line {
  font-weight: 700;
  color: var(--color1-150);
}

.home-practical__text strong {
  font-weight: 700;
  color: var(--color1-150);
}

.home-practical__access-img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto 0;
  border-radius: 6px;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
}

/* CTA row */
.home-cta {
  padding: 0 0 2rem;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Map */
.home-map {
  padding: 0 0 2.5rem;
}

.home-map iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 4px;
}

/* Catalogue */
.product-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 1rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e0dcd4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s ease;
}

.product-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
}

.product-card__media {
  line-height: 0;
}

.product-card__media img,
.product-card__no-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  background: #eceff1;
  margin: 0;
}

.product-card__body {
  padding: 0.5rem 0.875rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card__no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: #546e7a;
  border: 1px dashed #cfd8dc;
}

.product-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  line-height: 1.3;
  /* Réserve 2 lignes : aligne les blocs prix sur une même rangée de grille */
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-card .desc { font-size: 0.9rem; margin: 0.35rem 0 0; }

.product-prices {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0.45rem 0 0;
  width: 100%;
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  width: 100%;
}

/* Vrac = prix d’accroche ; Big Bag / Small Bag = secondaires, plus discrets */
.product-price-row--secondary {
  margin-top: 0.06rem;
  padding-top: 0.12rem;
}

.product-price-row--secondary .price-cond {
  font-size: 0.72rem;
  color: var(--muted);
}

.product-price-row--secondary .price-ht {
  font-size: 0.68rem;
  color: rgba(0, 0, 0, 0.42);
}

.product-price-row--secondary .price-sep {
  font-size: 0.65rem;
}

.product-prices--legacy .product-price-row {
  justify-content: flex-end;
}

.price-cond {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  line-height: 1.25;
}

.price-amounts {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.15rem 0.3rem;
  min-width: 0;
  text-align: right;
}

.price-sep {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}

.product-prices .price-ht {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
}

.product-prices .price-ttc {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color1);
  line-height: 1.25;
  white-space: nowrap;
}

.product-prices .product-price-row--primary .price-cond {
  color: var(--color1-150);
}

.product-prices .product-price-row--primary .price-ttc {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--color1);
}

.product-prices .product-price-row--secondary .price-cond {
  font-weight: 400;
}

.product-prices .product-price-row--secondary .price-ht {
  font-weight: 400;
}

.product-prices .product-price-row--secondary .price-ttc {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--color1-125);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.site-footer__social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.site-footer__social a {
  text-decoration: none;
  font-weight: 700;
}

.site-footer__version {
  margin: 2.75rem 0 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.75;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}
