/* Styles */
:root {
  --bg: #faf6ef;
  --surface: #fdfbf6;
  --muted: #f0ebe1;
  --border: #e3dcce;
  --text: #2a2118;
  --text-muted: #6b5d4a;
  --primary: #9a4a25;
  --primary-hover: #7e3a1c;
  --accent: #c89766;
  --radius: 8px;
  --max: 1100px;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  /* Sticky footer
  * https://developer.mozilla.org/en-US/docs/Web/CSS/How_to/Layout_cookbook/Sticky_footers
  */
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* This way the cursor state is visible over all the page instead of a small area. */
body.waiting {
  cursor: wait;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.2; }
h3 { font-size: 1.25rem; }
p { margin: 0; color: var(--text-muted); }

.container {
  max-width: var(--max); margin: 0 auto; padding: 0 1.25rem;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  margin: 0 0 0.75rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem; gap: 1rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);

  /*
  * Use display: flex; on the anchor tag to align the image and text side-by-side.
  * Use align-items: center; to vertically center the text with the logo.
  * Use gap to control the space between the image and the text.
  */
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav { display: none; gap: 1.5rem; font-size: 0.9rem; }
.site-nav a { color: var(--text-muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
@media (min-width: 768px) { .site-nav { display: flex; } }

/* Sections */
section { padding: 4rem 0; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { section { padding: 6rem 0; } }
section.alt { background: var(--muted); }

.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head p { margin-top: 1rem; }

/* Présentation — 2 cols */
.grid-2 { display: grid; gap: 2.5rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
}
.lead { margin-top: 1.5rem; font-size: 1.05rem; }
.lead p + p { margin-top: 1rem; }

.image-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.image-stack img { border-radius: var(--radius); object-fit: cover; width: 100%; height: 100%; }
.image-stack img:first-child { grid-row: span 2; aspect-ratio: 3 / 4; }
.image-stack img:last-child { aspect-ratio: 1 / 1; }

/* Atouts — 3 cols */
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card h3 { font-family: var(--font-serif); font-size: 1.3rem; }
.card p { margin-top: 0.75rem; font-size: 0.95rem; }

/* Éthique — 2 cols avec image dessous */
.ethique-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .ethique-grid { grid-template-columns: 1fr 1fr; } }
.ethique-col h3 { font-size: 1.5rem; }
.ethique-col p { margin-top: 0.75rem; }
.ethique-col img {
  margin-top: 1.5rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
}

/* Produits — 3 cols avec image dessous */
.produits-grid { display: grid; gap: 2rem; }
@media (min-width: 640px) { .produits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .produits-grid { grid-template-columns: repeat(3, 1fr); } }
.produit h3 { font-size: 1.25rem; }
.produit p { margin-top: 0.5rem; font-size: 0.95rem; }
.produit img {
  margin-top: 1rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
}

/* Ventes */
.ventes-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1rem;
}
@media (min-width: 640px) { .ventes-list { grid-template-columns: 1fr 1fr; } }
.vente {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.vente:hover { border-color: var(--primary); background: #f7eee2; }
.vente .arrow { color: var(--primary); transition: transform 0.15s; flex-shrink: 0; }
.vente:hover .arrow { transform: translateX(4px); }
.vente-name { font-family: var(--font-serif); font-size: 1.1rem; }
.vente-desc { font-size: 0.875rem; color: var(--text-muted); }

/* Footer */
.site-footer {
  background: var(--surface);
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.site-footer .container {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  text-align: center;
}
@media (min-width: 640px) {
  .site-footer .container { flex-direction: row; justify-content: space-between; text-align: left; }
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(253, 251, 246, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding: 1.25rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-inner { max-width: var(--max); margin: 0 auto; }
.cookie-main { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .cookie-main { grid-template-columns: 1fr auto; align-items: center; }
}
.cookie-main h2 { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 0.25rem; }
.cookie-main p { font-size: 0.9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
  font: inherit; cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem; font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--muted); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.cookie-settings[hidden] { display: none; }
.cookie-settings h2 { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 0.75rem; }
.cookie-option {
  display: flex; align-items: flex-start; gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  cursor: pointer;
}
.cookie-option input { margin-top: 0.25rem; }
.cookie-option strong { display: block; color: var(--text); font-weight: 500; }
.cookie-option span.desc { font-size: 0.85rem; color: var(--text-muted); }
.cookie-settings-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }

.cookie-close {
  position: absolute;
  top: 0; right: 0.75rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid #000;
  border-radius: 999px;
  font-size: 1.5rem; line-height: 1; color: var(--text-muted);
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.cookie-close:hover { background: var(--muted); color: var(--text); }

.cookie-reopen {
  position: fixed;
  bottom: 0.25rem; left: 1rem; z-index: 40;
  background: rgba(253, 251, 246, 0.9);
  border: 1px solid #000;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.cookie-reopen[hidden] { display: none; }
.cookie-reopen:hover { color: var(--text); }

/* Legal page */
.legal { max-width: 720px; margin: 0 auto; padding: 4rem 1.25rem; }
.legal h1 { margin-bottom: 2rem; }
.legal section { padding: 0; border: 0; margin-bottom: 2rem; }
.legal h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.legal p { font-size: 1rem; }

/* Offres — filters + grid of cards */
.offres-filters {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem;
}
.offres-filters label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.offres-filters select {
  font: inherit; font-size: 0.95rem; text-transform: none; letter-spacing: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  min-width: 220px;
  cursor: pointer;
}
.offres-filters select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.offres-grid {
  display: grid; gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .offres-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .offres-grid { grid-template-columns: repeat(3, 1fr); } }

.offre-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.offre-carousel {
  position: relative; aspect-ratio: 4 / 3; background: var(--muted);
}
.offre-carousel img {
  width: 100%; height: 100%; object-fit: cover; cursor: zoom-in;
  display: none;
}
.offre-carousel img.active { display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  width: 34px; height: 34px; border-radius: 999px;
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }
.carousel-dots {
  position: absolute; bottom: 0.5rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.35rem;
}
.carousel-dots span {
  width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.6);
}
.carousel-dots span.active { background: var(--primary); }

.offre-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.offre-cat {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--primary); font-weight: 600;
}
.offre-title { font-family: var(--font-serif); font-size: 1.15rem; margin: 0; }
.offre-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.offre-price { font-weight: 600; color: var(--text); font-size: 1.05rem; }
.offre-stock {
  font-size: 0.75rem; padding: 0.15rem 0.55rem; border-radius: 999px;
  background: #e6f1e6; color: #2d6a2d;
}
.offre-stock.out { background: #f3e0db; color: #8a3a25; }
.offre-desc { font-size: 0.9rem; color: var(--text-muted); }
.offre-link {
  margin-top: auto;
  display: inline-block; text-align: center;
  background: var(--primary); color: #fff; text-decoration: none;
  padding: 0.55rem 1rem; border-radius: 6px;
  font-size: 0.875rem; font-weight: 500;
  transition: background 0.15s;
}
.offre-link:hover { background: var(--primary-hover); }
.offre-link.disabled { pointer-events: none; cursor: not-allowed; }
.offres-empty { text-align: center; color: var(--text-muted); padding: 2rem 0; }

/* Contact & Socials */
.contact-col h3 { font-family: var(--font-serif); font-size: 1.2rem; }
.contact-col p { margin-top: 0.5rem; }
.contact-col a { color: var(--primary); }
.contact-hours { list-style: none; padding: 0; margin: 0.5rem 0 0; color: var(--text-muted); }
.contact-hours li { padding: 0.25rem 0; }
.socials { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.socials a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem; border-radius: 999px;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}
.socials a:hover { background: var(--muted); border-color: var(--primary); color: var(--primary); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 95vw; max-height: 90vh; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.15); color: #fff;
  border: 0; width: 44px; height: 44px; border-radius: 999px;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* Pagination des offres */
.offres-pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 2rem; flex-wrap: wrap; }
.offres-pagination .page-btn {
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.7rem;
  border: 1px solid var(--border, #d9c9b8); background: #fff;
  color: inherit; font: inherit; border-radius: 6px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.offres-pagination .page-btn:hover:not(:disabled) { background: var(--muted, #f3ece4); }
.offres-pagination .page-btn.active {
  background: var(--primary, #b5532a); color: #fff; border-color: var(--primary, #b5532a);
}
.offres-pagination .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block; width: 20px; height: 2px; margin: 0 auto;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
  .site-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(250, 246, 239, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 400px; }
  .site-nav a {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 1rem;
  }
}
@media (min-width: 768px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* Contact page */
.contact { max-width: 720px; margin: 0 auto; padding: 4rem 1.25rem; }
.contact h1 { margin-bottom: 2rem; }
.contact section { padding: 0; border: 0; margin-bottom: 2rem; }
.contact h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.contact p { font-size: 1rem; }

input, button {
  font-size: 100%;
  margin: 0;
  padding: 0;
}

[type="checkbox"] {
  flex-shrink: 0;
  padding: 0;
  user-select: none;
}

[type="checkbox"]:focus {
  outline: none;
}

.fs-form {
  display: grid;
  row-gap: 1.5rem;
}

fieldset {
  border: 0;
  display: grid;
  margin: 1.5rem 0;
  row-gap: 1.5rem;
}

.fs-field {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
}

.fs-label {
  display: block;
  font-size: 1rem;
  line-height: 1.25rem;
}

.fs-description {
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
  line-height: 1.25rem;
}

.fs-button-group {
  display: flex;
  flex-direction: row-reverse;
  column-gap: 1.5rem;
}

.fs-button {
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5rem;
  padding: 0.75rem 2rem;
  transition-duration: 200ms;
  transition-property: background-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--muted);
  background: var(--primary);
  border-color: var(--border);
}

.fs-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.fs-form .fs-button:disabled {
  cursor: auto;
  cursor: not-allowed;
  background: #c0c0c0;
}

.fs-input {
  appearance: none;
  border-radius: 9999px;
  border-width: 0;
  box-shadow: var(--border) 0 0 0 1px inset;
  font-size: 1rem;
  height: 3rem;
  line-height: 1.5rem;
  outline: none;
  padding-left: 1rem;
  padding-right: 1rem;
}

.fs-input:focus-visible {
  box-shadow: var(--primary-hover) 0 0 0 1px inset;
}

.fs-input::placeholder {
  color: var(--text-muted);
}

.fs-checkbox-field {
  column-gap: 0.5rem;
  display: flex;
}

.fs-checkbox-wrapper {
  align-items: center;
  display: flex;
  height: 1.25rem;
}

.fs-checkbox {
  height: 1.25rem;
  width: 1.25rem;
}

.col-span-full {
  grid-column: 1 / -1;
}

/* Error and maintenance pages */
.error {
  max-width: 720px; margin: 0 auto; padding: 4rem 1.25rem;
  text-align: center;
}
.error h1 { margin-bottom: 2rem; }
.error section { padding: 0; border: 0; margin-bottom: 2rem; }
.error h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
.error p { font-size: 1rem; }