/*
 * Template Lifestyle — Styles scopés
 * Fait partie de WP Vendor Nexus 3.9.0 — Templates de boutique personnalisables
 *
 * Toutes les règles sont préfixées sous .nx-template-lifestyle.
 * Les tokens dynamiques (--nxt-accent, --nxt-accent-hover, --nxt-accent-soft)
 * sont injectés au runtime par TemplateRenderer via <style id="nx-shop-tokens">.
 * Les imports Google Fonts sont gérés par TemplateRenderer selon $tokens['heading_font'].
 *
 * Palette warm/earth tones cohérente avec l'accent brun #8a6a3a.
 */

/* ── Reset local ─────────────────────────────────────────────────────────── */
.nx-template-lifestyle *,
.nx-template-lifestyle *::before,
.nx-template-lifestyle *::after {
  box-sizing: border-box;
}

.nx-template-lifestyle img {
  max-width: 100%;
  display: block;
}

.nx-template-lifestyle a {
  color: inherit;
}

.nx-template-lifestyle button {
  font: inherit;
  cursor: pointer;
}

/* ── Variables de mode ───────────────────────────────────────────────────── */
.nx-template-lifestyle.is-light:not(.nx-shop-theme-v2) {
  --nxt-bg:     #fafaf7;
  --nxt-text:   #2a2520;
  --nxt-border: #d8d2c4;
  --nxt-muted:  #8a8175;
}

.nx-template-lifestyle.is-dark:not(.nx-shop-theme-v2) {
  --nxt-bg:     #1a1612;
  --nxt-text:   #f4eee0;
  --nxt-border: #3a342a;
  --nxt-muted:  #968b7a;
}

/* ── Racine du template ──────────────────────────────────────────────────── */
.nx-template-lifestyle {
  background: var(--nx-color-page, var(--nxt-bg));
  color: var(--nx-color-text, var(--nxt-text));
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  transition: background-color 0.9s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s ease;
}

.nx-template-lifestyle h1,
.nx-template-lifestyle h2,
.nx-template-lifestyle h3 {
  margin: 0;
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-weight: 400;
}

.nx-template-lifestyle p {
  margin: 0;
}

/* ── Cover bar ───────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-cover-bar {
  background: var(--nxt-text);
  color: var(--nxt-bg);
  padding: 11px clamp(20px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 5vw, 80px);
  border-bottom: 1px solid var(--nxt-border);
}

.nx-template-lifestyle .nxt-header-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nx-template-lifestyle .nxt-header-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--nxt-border);
  padding: 4px;
}

.nx-template-lifestyle .nxt-header-name {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.005em;
}

.nx-template-lifestyle .nxt-header-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nxt-muted);
}

.nx-template-lifestyle .nxt-header-meta__strong {
  color: var(--nxt-text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .nx-template-lifestyle .nxt-header-meta {
    display: none;
  }
}

/* ── Hero intro ──────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-intro {
  max-width: 880px;
  margin: 0 auto;
  padding: 100px clamp(24px, 5vw, 40px) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nx-template-lifestyle .nxt-intro-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--nxt-accent);
  font-weight: 600;
  display: block;
  margin-bottom: 22px;
}

.nx-template-lifestyle .nxt-intro-title {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(44px, 6.5vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.nx-template-lifestyle .nxt-intro-sub {
  margin-top: 64px;
  font-size: 17px;
  line-height: 1.85;
  color: var(--nxt-muted);
  max-width: 50ch;
}

/* ── Section label générique ─────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-section-label {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--nxt-muted);
  margin-bottom: 32px;
}

.nx-template-lifestyle .nxt-section-label::before,
.nx-template-lifestyle .nxt-section-label::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--nxt-border);
  vertical-align: middle;
  margin: 0 14px;
}

.nx-template-lifestyle .nxt-section-title {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 32px;
}

/* ── Rituals ─────────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-rituals {
  padding: 80px clamp(20px, 5vw, 80px) 96px;
}

.nx-template-lifestyle .nxt-rituals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .nx-template-lifestyle .nxt-rituals-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.nx-template-lifestyle .nxt-ritual-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nx-template-lifestyle .nxt-ritual-card__image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
}

.nx-template-lifestyle .nxt-ritual-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.nx-template-lifestyle .nxt-ritual-card:hover .nxt-ritual-card__img {
  transform: scale(1.04);
}

.nx-template-lifestyle .nxt-ritual-card__time {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--nxt-accent);
  font-weight: 600;
}

.nx-template-lifestyle .nxt-ritual-card__body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--nxt-muted);
}

/* ── Story / Atelier ─────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-atelier {
  padding: 96px clamp(20px, 5vw, 80px);
  border-top: 1px solid var(--nxt-border);
  border-bottom: 1px solid var(--nxt-border);
}

.nx-template-lifestyle .nxt-atelier-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 768px) {
  .nx-template-lifestyle .nxt-atelier-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Reuse atelier-inner grid for the section layout */
.nx-template-lifestyle .nxt-atelier {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: center;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .nx-template-lifestyle .nxt-atelier {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.nx-template-lifestyle .nxt-atelier-portrait {
  /* Column 1 */
}

.nx-template-lifestyle .nxt-atelier-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

.nx-template-lifestyle .nxt-atelier-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--nxt-accent);
  font-weight: 600;
  display: block;
  margin-bottom: 16px;
}

.nx-template-lifestyle .nxt-atelier-heading {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
  max-width: 18ch;
}

.nx-template-lifestyle .nxt-atelier-text {
  font-size: 16px;
  line-height: 1.85;
  color: var(--nxt-text);
  max-width: 52ch;
  margin-bottom: 16px;
}

.nx-template-lifestyle .nxt-atelier-stats {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--nxt-border);
}

/* Stat block scoped */
.nx-template-lifestyle .nxt-stat-block {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-template-lifestyle .nxt-stat-block__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nx-template-lifestyle .nxt-stat-block__number {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: 22px;
  letter-spacing: -0.005em;
  color: var(--nxt-text);
}

.nx-template-lifestyle .nxt-stat-block__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nxt-muted);
}

/* ── Materials ───────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-matter {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px clamp(20px, 5vw, 80px) 32px;
}

.nx-template-lifestyle .nxt-matter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--nxt-border);
}

.nx-template-lifestyle .nxt-matter-title {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.nx-template-lifestyle .nxt-matter-sub {
  font-size: 13px;
  color: var(--nxt-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nx-template-lifestyle .nxt-matter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .nx-template-lifestyle .nxt-matter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .nx-template-lifestyle .nxt-matter-grid {
    grid-template-columns: 1fr;
  }
}

.nx-template-lifestyle .nxt-matter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: color-mix(in srgb, var(--nxt-bg) 85%, var(--nxt-border));
  border-radius: 4px;
  transition: transform 0.25s ease, background 0.25s ease;
  cursor: default;
}

.nx-template-lifestyle .nxt-matter-card:hover {
  transform: translateY(-3px);
  background: var(--nxt-bg);
  outline: 1px solid var(--nxt-border);
}

.nx-template-lifestyle .nxt-matter-name {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--nxt-text);
}

.nx-template-lifestyle .nxt-matter-detail {
  font-size: 13px;
  color: var(--nxt-muted);
  line-height: 1.6;
}

/* ── Flatlay ─────────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-flatlay-section {
  padding: 64px clamp(20px, 5vw, 80px);
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

.nx-template-lifestyle .nxt-flatlay {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: color-mix(in srgb, var(--nxt-bg) 80%, var(--nxt-border));
}

.nx-template-lifestyle .nxt-flatlay__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Featured products ───────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-featured {
  padding: 80px clamp(20px, 5vw, 80px) 96px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Product grid scoped */
.nx-template-lifestyle .nxt-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

@media (max-width: 900px) {
  .nx-template-lifestyle .nxt-product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .nx-template-lifestyle .nxt-product-grid {
    grid-template-columns: 1fr;
  }
}

.nx-template-lifestyle .nxt-product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.nx-template-lifestyle .nxt-product-card:hover {
  transform: translateY(-4px);
}

.nx-template-lifestyle .nxt-product-card__image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--nxt-bg) 80%, var(--nxt-border));
}

.nx-template-lifestyle .nxt-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.nx-template-lifestyle .nxt-product-card:hover .nxt-product-card__img {
  transform: scale(1.04);
}

.nx-template-lifestyle .nxt-product-card__body {
  padding: 12px 0 0;
}

.nx-template-lifestyle .nxt-product-card__title {
  font-family: var(--nxt-heading-font, 'Cormorant Garamond', Georgia, serif);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 4px;
  color: var(--nxt-text);
}

.nx-template-lifestyle .nxt-product-card__price {
  font-size: 14px;
  color: var(--nxt-accent);
  font-weight: 500;
}

/* ── Image placeholder ───────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-img-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(140% 100% at 100% 0%, var(--nxt-accent-soft) 0%, transparent 50%),
    radial-gradient(140% 100% at 0% 100%, color-mix(in srgb, var(--nxt-accent) 18%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--nxt-bg) 75%, var(--nxt-border)) 0%, var(--nxt-bg) 100%);
}

.nx-template-lifestyle .nxt-img-placeholder--wide {
  aspect-ratio: 5 / 4;
}

/* ── Demo flag ───────────────────────────────────────────────────────────── */
.nx-template-lifestyle .nxt-demo-flag {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: var(--nxt-accent);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  pointer-events: none;
  gap: 4px;
  align-items: center;
}

/* Shown only when customizer is active */
.nx-customizer-active .nx-template-lifestyle .nxt-demo-flag {
  display: inline-flex;
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .nx-template-lifestyle,
  .nx-template-lifestyle * {
    transition: none !important;
    animation: none !important;
  }
}
