/* ============================================================
   LES FRÈRES MARNAIS — Design System
   Direction : Luxe organique méditerranéen
   Palette   : Bleu azur · Terracotta · Beige sable
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=Jost:wght@300;400;500&display=swap');

/* ── Tokens ── */
:root {
  --azur:            #4A8FA3;
  --azur-dark:       #316475;
  --azur-light:      #D6E9F0;
  --terracotta:      #B85C32;
  --terracotta-light:#E8997A;
  --sable:           #C2A07A;
  --sable-light:     #EDE0CE;
  --creme:           #FAF7F2;
  --brun:            #231608;
  --brun-moyen:      #5A3E28;
  --blanc:           #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  --nav-h: 80px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--creme);
  color: var(--brun);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

.label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(250, 247, 242, 0.97);
  box-shadow: 0 1px 0 rgba(35, 22, 8, 0.08);
  backdrop-filter: blur(8px);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--blanc);
  transition: color var(--transition);
}

.nav.scrolled .nav-brand { color: var(--brun); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  position: relative;
  transition: color var(--transition);
}

.nav.scrolled .nav-links a { color: var(--brun-moyen); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); transform-origin: left; }

.nav-links a:hover { color: var(--blanc); }
.nav.scrolled .nav-links a:hover { color: var(--terracotta); }

/* ── Cart nav icon ── */
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  color: inherit;
}

.nav-cart svg { stroke: var(--blanc); transition: stroke var(--transition); }
.nav.scrolled .nav-cart svg { stroke: var(--brun); }

.cart-badge {
  position: absolute;
  top: -7px; right: -8px;
  background: var(--terracotta);
  color: var(--blanc);
  border-radius: 50%;
  width: 16px; height: 16px;
  font-size: 0.58rem;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1px;
  background: var(--blanc);
  transition: var(--transition);
}
.nav.scrolled .nav-toggle span { background: var(--brun); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-light {
  background: transparent;
  border-color: rgba(255,255,255,0.8);
  color: var(--blanc);
}
.btn-light:hover {
  background: var(--blanc);
  color: var(--brun);
  border-color: var(--blanc);
}

.btn-dark {
  background: var(--brun);
  border-color: var(--brun);
  color: var(--blanc);
}
.btn-dark:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.btn-outline {
  background: transparent;
  border-color: var(--brun-moyen);
  color: var(--brun-moyen);
}
.btn-outline:hover {
  background: var(--brun);
  border-color: var(--brun);
  color: var(--blanc);
}

/* ── Hero ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
  transition: transform 8s ease;
}

.hero:hover .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(35, 22, 8, 0.52) 0%,
    rgba(35, 22, 8, 0.38) 50%,
    rgba(74, 143, 163, 0.22) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  animation: fadeUp 1.1s ease both;
}

.hero-eyebrow {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--blanc);
  margin-bottom: 0.2rem;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--sable-light);
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: rgba(255,255,255,0.72);
  margin: 1.4rem 0 2.4rem;
  font-weight: 300;
}

/* ── Sections ── */
.section { padding: 7rem 3rem; }
.section-sm { padding: 4rem 3rem; }

.container { max-width: 1160px; margin: 0 auto; }
.container-narrow { max-width: 720px; margin: 0 auto; }

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-top: 0.6rem;
}

/* ── Two-column intro ── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.intro-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5/6;
  max-height: 520px;
}

.intro-image img,
.intro-image video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.intro-image:hover img,
.intro-image:hover video { transform: scale(1.04); }

.intro-image::before {
  content: none;
}

.intro-text h2 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  margin-bottom: 1.4rem;
  margin-top: 0.6rem;
  white-space: nowrap;
}

.intro-text p {
  color: var(--brun-moyen);
  margin-bottom: 1.2rem;
  font-size: 0.97rem;
}

.intro-text .btn { margin-top: 1.4rem; }

/* ── Market banner ── */
.market-banner {
  background: var(--terracotta);
  color: var(--blanc);
  text-align: center;
  padding: 2.8rem 3rem;
}

.market-banner .label {
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.8rem;
}

.market-banner h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.market-details {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.82);
  margin-top: 0.8rem;
}

.market-details span { display: flex; align-items: center; gap: 0.5rem; }
.market-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

/* ── Products ── */
.product-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.product-section.reverse .product-image-wrap { order: 2; }
.product-section.reverse .product-info { order: 1; }

.product-image-wrap {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}

.product-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.product-image-wrap:hover img { transform: none; }

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3.5rem 4vw;
  background: var(--creme);
}

.product-number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 300;
  color: var(--sable-light);
  line-height: 1;
  margin-bottom: 1rem;
  user-select: none;
}

.product-info h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 0.4rem;
}

.product-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--terracotta);
  font-size: 1.1rem;
  margin-bottom: 1.8rem;
}

.product-info p {
  color: var(--brun-moyen);
  font-size: 0.95rem;
  max-width: 460px;
  margin-bottom: 1rem;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.product-detail {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--brun-moyen);
}

.product-detail strong {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brun);
  font-weight: 500;
  min-width: 80px;
}

.product-divider {
  width: 40px;
  height: 1px;
  background: var(--sable);
  margin: 1.8rem 0;
}

/* Séparateur visuel entre produits */
.product-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sable-light), transparent);
  margin: 0 3rem;
}

/* ── Page header (Créations / Histoire) ── */
.page-header {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 4rem;
  text-align: center;
  padding-left: 3rem;
  padding-right: 3rem;
}

.page-header h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  margin-top: 0.6rem;
}

.page-header p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brun-moyen);
  font-size: 1.1rem;
  margin-top: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Histoire ── */
.histoire-content {
  padding: 0 3rem 6rem;
}

.histoire-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 6rem;
  align-items: start;
}

.histoire-image {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  overflow: hidden;
  aspect-ratio: 2/3;
}

.histoire-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.histoire-text h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  margin-bottom: 1.2rem;
  margin-top: 0.4rem;
}

.histoire-text p {
  color: var(--brun-moyen);
  margin-bottom: 1.4rem;
  font-size: 0.97rem;
}

.dropcap::first-letter {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 400;
  float: left;
  line-height: 0.8;
  margin-right: 0.12em;
  margin-top: 0.08em;
  color: var(--terracotta);
}

.divider-line {
  width: 60px;
  height: 1px;
  background: var(--sable);
  margin: 2.8rem 0;
}

/* ── Contact ── */
.contact-block {
  background: var(--sable-light);
  padding: 3rem;
  margin-top: 3rem;
}

.contact-block h3 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  margin-top: 0.4rem;
}

.contact-block p {
  color: var(--brun-moyen);
  font-size: 0.9rem;
  margin-bottom: 1.6rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item strong {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  min-width: 70px;
  color: var(--brun);
  font-weight: 500;
}

.contact-item span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brun);
}

/* ── Footer ── */
.footer {
  background: var(--brun);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 3rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--blanc);
  margin-bottom: 0.5rem;
}

.footer p {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 1.5rem 0;
}

.footer-nav a {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--sable); }

/* ── Color swatches ── */
.color-selector {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 0 0.4rem;
}

.color-selector-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brun);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.color-swatches {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color 0.2s;
  position: relative;
}

.swatch:hover { outline-color: var(--brun-moyen); }
.swatch.active { outline-color: var(--brun); }

/* ── Matière label ── */
.matiere-label {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--brun-moyen);
}

/* ── Prix & panier ── */
.product-price {
  font-family: var(--font-body);
  font-size: 2.6rem;
  font-weight: 400;
  font-style: normal;
  color: var(--brun);
  margin: 1.4rem 0 1.2rem;
  letter-spacing: 0.01em;
}

.btn-cart {
  display: inline-block;
  width: 100%;
  max-width: 300px;
  text-align: center;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--brun);
  color: var(--blanc);
  border: 1px solid var(--brun);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn-cart:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav { padding: 0 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--creme); padding: 1.5rem; gap: 1.2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--brun-moyen); font-size: 0.8rem; }
  .nav-toggle { display: flex; }

  .intro-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .intro-image { aspect-ratio: 4/3; }

  .product-section { grid-template-columns: 1fr; }
  .product-section.reverse .product-image-wrap { order: 0; }
  .product-section.reverse .product-info { order: 0; }
  .product-image-wrap { min-height: 320px; height: 65vw; max-height: 420px; }
  .product-info { padding: 3rem 1.5rem; }

  .histoire-grid { grid-template-columns: 1fr; gap: 3rem; }
  .histoire-image { position: static; aspect-ratio: 4/3; }

  .section { padding: 4rem 1.5rem; }
  .section-sm { padding: 2.5rem 1.5rem; }
  .page-header { padding-left: 1.5rem; padding-right: 1.5rem; }
  .histoire-content { padding: 0 1.5rem 4rem; }
  .contact-block { padding: 2rem 1.5rem; }
}

@media (max-width: 560px) {
  .market-details { flex-direction: column; gap: 0.6rem; }
  .market-dot { display: none; }
  .hero h1 { font-size: 2.6rem; }
}
