:root {
  --bg: #faf7f2;
  --bg-alt: #f1ebe2;
  --surface: #ffffff;
  --fg: #1f2326;
  --muted: #5d6268;
  --blue: #2f5d6e;
  --blue-dark: #224553;
  --clay: #8c4f33;
  --sand: #e8dccb;
  --line: #e3d9cb;
  --field-border: #857a6c;
  --footer-bg: #1f2326;
  --footer-fg: #e9e3da;
  --on-accent: #ffffff;
  --danger: #b3261e;
  --success: #1e7b45;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(31, 35, 38, 0.08);
  --font-title: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181b;
    --bg-alt: #1c2024;
    --surface: #23282d;
    --fg: #eef0f2;
    --muted: #a9afb7;
    --blue: #7fb3c4;
    --blue-dark: #a3cad7;
    --clay: #dd9a78;
    --sand: #3a3229;
    --line: #333a42;
    --field-border: #7d8692;
    --footer-bg: #0f1113;
    --footer-fg: #d9d4cc;
    --on-accent: #10161c;
    --danger: #ff8a80;
    --success: #6fd49a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); }
img { max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 48rem; }

:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--fg); color: var(--bg); padding: 0.6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  color: var(--clay); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.78rem; margin-bottom: 0.75rem;
}

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; }

.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-title); font-size: 1.35rem; font-weight: 600;
  color: var(--fg); text-decoration: none;
}
.logo svg { width: 2rem; height: 2rem; }
.logo circle { fill: var(--blue); }
.logo .logo-ring { fill: none; stroke: var(--bg); stroke-width: 2; }

.menu { display: flex; align-items: center; gap: 1.75rem; }
.menu a:not(.btn) {
  color: var(--fg); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.04em; padding: 0.25rem 0; border-bottom: 1px solid transparent;
}
.menu a:not(.btn):hover { border-bottom-color: var(--clay); }

.menu-toggle { display: none; background: none; border: 0; padding: 0.6rem; cursor: pointer; }
.menu-toggle .bar { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--fg); transition: transform 0.2s, opacity 0.2s; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 800px) {
  .menu-toggle { display: block; }
  .menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
  }
  .menu.open { display: flex; }
  .menu a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .menu .btn { margin-top: 0.75rem; text-align: center; }
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem;
  background: var(--blue); color: var(--on-accent);
  border: 1.5px solid var(--blue); border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font: inherit; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-ghost:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-small { min-height: 2.5rem; padding: 0.45rem 1.2rem; font-size: 0.9rem; }

/* Accueil */
.hero { padding: 4.5rem 0 4rem; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.reassurance {
  list-style: none; padding: 0; margin: 2.25rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  font-size: 0.9rem; color: var(--muted);
}
.reassurance li::before { content: "✓"; color: var(--blue); font-weight: 700; margin-right: 0.4rem; }

.hero-photo { margin: 0; position: relative; isolation: isolate; }
.hero-photo::before {
  content: ""; position: absolute; inset: 2rem -2rem -2rem 2rem;
  background: var(--sand); border-radius: calc(var(--radius) * 1.5); z-index: -1;
}
.hero-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow);
}

@media (max-width: 800px) {
  .hero { padding: 1.5rem 0 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo { order: -1; margin-right: 1rem; }
  .hero-photo::before { inset: 1rem -1rem -1rem 1rem; }
}

/* Sections */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 40rem; margin-bottom: 2.75rem; }
.section-intro { color: var(--muted); margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media (max-width: 800px) {
  .section { padding: 3.75rem 0; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.facts strong { font-family: var(--font-title); font-size: 1.2rem; font-weight: 600; }
.facts span { color: var(--muted); }

/* Produits */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 2.75rem 2rem; }
.product h3 { margin: 1.1rem 0 0.35rem; }
.product p { color: var(--muted); margin-bottom: 0.5rem; }
.product .price { color: var(--fg); font-weight: 600; letter-spacing: 0.01em; margin: 0; }

.product-media {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: var(--sand); border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
}
.product-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-media:hover img, .product-media:focus-visible img { transform: scale(1.05); }
.product-cta {
  position: absolute; left: 1rem; bottom: 1rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--fg);
  font-size: 0.85rem; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 999px;
  box-shadow: var(--shadow);
}

/* Offres */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; }
.offer {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem;
}
.offer-featured { background: var(--blue); border-color: var(--blue); color: var(--on-accent); box-shadow: var(--shadow); }
.offer-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  background: var(--bg); color: var(--fg); padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 1rem;
}
.offer-price { font-family: var(--font-title); font-size: 1.8rem; margin-bottom: 1rem; }
.offer ul { margin: 0; padding: 0; list-style: none; }
.offer li { padding: 0.5rem 0; border-top: 1px solid var(--line); color: var(--muted); }
.offer-featured li { border-top-color: color-mix(in srgb, var(--on-accent) 25%, transparent); color: inherit; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.5rem; }
.gallery-item img { aspect-ratio: 1; }
.gallery-caption {
  position: absolute; inset: auto 0 0 0; padding: 2.5rem 1.1rem 1rem; text-align: left;
  color: #fff; font-family: var(--font-title); font-size: 1.2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

/* FAQ */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; font-weight: 600; padding: 1.15rem 0; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--clay); font-size: 1.4rem; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--muted); padding-bottom: 1.15rem; margin: 0; }

/* Contact */
.contact-info { list-style: none; padding: 0; color: var(--muted); }
.contact-info li { margin-bottom: 0.5rem; }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--fg);
  background: var(--bg); border: 1px solid var(--field-border); border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 0.9rem; margin: 0.3rem 0 0; }
.error:empty { display: none; }
.form-success { color: var(--success); font-weight: 600; margin: 0.9rem 0 0; }

/* Pied de page */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding: 3.5rem 0 6rem; font-size: 0.95rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.footer-logo { font-family: var(--font-title); font-size: 1.5rem; margin-bottom: 0.4rem; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer a { color: var(--footer-fg); }
.footer-credit { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 1.25rem; margin: 0; font-size: 0.85rem; opacity: 0.85; }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* Fiche produit */
.product-dialog {
  width: min(62rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
  padding: 0; border: 0; border-radius: calc(var(--radius) * 1.25); overflow: hidden;
  background: var(--surface); color: var(--fg); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.product-dialog::backdrop { background: rgba(20, 22, 24, 0.6); backdrop-filter: blur(3px); }
.product-dialog[open] { animation: dialog-in 0.25s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.dialog-inner { display: grid; grid-template-columns: 1.1fr 1fr; position: relative; }
.dialog-media { margin: 0; background: var(--sand); }
.dialog-media img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 20rem; }
.dialog-body { padding: 2.25rem 2rem 2rem; overflow-y: auto; max-height: calc(100vh - 2rem); }
.dialog-body h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); padding-right: 2rem; }
.dialog-body h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-top: 1.25rem; }
.dialog-body p { color: var(--muted); }
.dialog-body .dialog-price { font-size: 1.15rem; font-weight: 700; color: var(--fg); }
.dialog-body .dialog-lead { font-size: 1.08rem; color: var(--fg); }
.dialog-details { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 1.25rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.dialog-details dt { font-weight: 600; }
.dialog-details dd { margin: 0; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.dialog-close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface); color: var(--fg); font-size: 1.6rem; line-height: 1; box-shadow: var(--shadow);
}

@media (max-width: 800px) {
  .product-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .dialog-inner { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .dialog-media img { min-height: 0; aspect-ratio: 4 / 3; height: auto; }
  .dialog-body { max-height: none; overflow: visible; padding: 1.5rem 1.25rem 2rem; }
  .product-dialog[open] { animation-name: sheet-in; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Assistant FAQ */
.assistant { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; }
.assistant-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--blue); color: var(--on-accent); border: 0; border-radius: 999px;
  padding: 0.85rem 1.25rem; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.assistant-toggle svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }

.assistant-panel {
  position: absolute; right: 0; bottom: calc(100% + 0.75rem);
  width: min(22rem, calc(100vw - 2rem));
  height: min(30rem, calc(100vh - 8rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  display: flex; flex-direction: column; overflow: hidden;
}
.assistant-panel[hidden], .assistant-suggestions[hidden] { display: none; }
.assistant-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--blue); color: var(--on-accent); padding: 0.75rem 1rem;
}
.assistant-close {
  background: none; border: 0; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
  min-width: 2.75rem; min-height: 2.75rem; margin: -0.5rem -0.75rem -0.5rem 0;
}

.assistant-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.msg { max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 14px; font-size: 0.95rem; }
.msg p { margin: 0; }
.msg-bot { background: var(--bg-alt); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--blue); color: var(--on-accent); align-self: flex-end; border-bottom-right-radius: 4px; }

.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.75rem; }
.assistant-suggestions button {
  background: none; border: 1px solid var(--blue); color: var(--blue);
  border-radius: 999px; padding: 0.35rem 0.75rem; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.assistant-suggestions button:hover { background: var(--blue); color: var(--on-accent); }

.assistant-form { display: flex; border-top: 1px solid var(--line); }
.assistant-form input {
  flex: 1; min-width: 0; border: 0; padding: 0.8rem 1rem;
  font: inherit; font-size: 16px; background: var(--surface); color: var(--fg);
}
.assistant-form input:focus { outline: none; }
.assistant-form:focus-within { box-shadow: inset 0 0 0 2px var(--clay); }
.assistant-form button { border: 0; background: none; color: var(--blue); padding: 0 1rem; font-size: 1.2rem; cursor: pointer; min-width: 2.75rem; }

@media (max-width: 480px) {
  .assistant-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .assistant-toggle { padding: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
