@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-h: 76px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  --bg: #e8e1db;
  --bg-soft: #ded3c7;
  --surface: #f4efea;
  --surface-strong: #ffffff;
  --border: rgba(42, 29, 22, 0.14);
  --text: #2a1d16;
  --text-muted: rgba(42, 29, 22, 0.62);
  --accent: #a9695a;
  --accent-strong: #8b4f42;
  --accent-contrast: #f8f1ec;
  --shadow: rgba(42, 29, 22, 0.1);
}

:root[data-theme="dark"] {
  --bg: #201510;
  --bg-soft: #2a1d16;
  --surface: #2b1e17;
  --surface-strong: #33241b;
  --border: rgba(240, 230, 220, 0.14);
  --text: #f2e8de;
  --text-muted: rgba(242, 232, 222, 0.62);
  --accent: #d29277;
  --accent-strong: #e3ab8f;
  --accent-contrast: #241610;
  --shadow: rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

/* Navigation fluide entre les pages : transition native du navigateur,
   sans JS. Ignorée silencieusement par les navigateurs qui ne la
   supportent pas encore (dégradation gracieuse). */
@view-transition {
  navigation: auto;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.icon {
  width: 20px;
  height: 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  z-index: 100;
  background: transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

/* Le header ne crossfade pas avec le reste : il reste stable pendant
   qu'une nouvelle page se charge, pour un aller-retour plus lisible. */
.site-header {
  view-transition-name: site-header;
}

.brand {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--text-muted);
}

.brand-dot {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 34px);
}

.site-nav a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-moon {
  display: block;
}

/* ---------- Sections ---------- */

main {
  scroll-snap-type: y proximity;
}

.section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) clamp(20px, 6vw, 80px) 64px;
  scroll-snap-align: start;
  scroll-margin-top: 0;
  position: relative;
}

.section-inner {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.back-link .icon {
  width: 16px;
  height: 16px;
}

.back-link:hover {
  color: var(--accent-strong);
  transform: translateX(-3px);
}

h1,
h2 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 560;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
}

.lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.55;
  margin: 20px 0 0;
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(60% 50% at 82% 12%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
}

.hero-inner {
  padding-top: 0;
}

.world-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 44px;
  max-width: 640px;
}

.world-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.world-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 32px -20px var(--shadow);
}

.world-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

.world-card-icon svg {
  width: 19px;
  height: 19px;
}

.world-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.world-card-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.scroll-cue {
  position: absolute;
  left: clamp(20px, 6vw, 80px);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  animation: float 2.6s ease-in-out infinite;
}

.scroll-cue .icon {
  width: 16px;
  height: 16px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- CTA button ---------- */

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.cta-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Gallery (photo) ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.placeholder-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
}

.placeholder-tile svg {
  width: 30px;
  height: 30px;
  opacity: 0.5;
}

.placeholder-tile figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent-contrast);
  opacity: 0.85;
}

.tone-1 { background: color-mix(in srgb, var(--accent) 34%, var(--bg-soft)); }
.tone-2 { background: color-mix(in srgb, var(--accent) 20%, var(--bg-soft)); }
.tone-3 { background: color-mix(in srgb, var(--accent) 46%, var(--bg-soft)); }
.tone-4 { background: color-mix(in srgb, var(--accent) 12%, var(--bg-soft)); }

.tone-1 svg, .tone-2 svg, .tone-3 svg, .tone-4 svg,
.tone-1 figcaption, .tone-2 figcaption, .tone-3 figcaption, .tone-4 figcaption {
  color: var(--accent-contrast);
}

/* ---------- Products (customisation) ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.product-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.product-icon svg {
  width: 21px;
  height: 21px;
}

.product-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.product-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0 0 10px;
}

.product-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ---------- Contact ---------- */

.section-contact {
  background: var(--bg-soft);
}

.contact-form {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  max-width: 720px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.field-message {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .cta-btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.form-status {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.form-status.is-error {
  color: var(--accent-strong);
}

.direct-contact {
  display: flex;
  gap: 22px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.direct-contact a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.direct-contact a:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 26px clamp(20px, 6vw, 80px) 34px;
  background: var(--bg-soft);
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }

  .world-cards {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-cue {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
