/* ============================================================
   YOROKOBI — Design tokens & base styles
   ============================================================ */

:root {
  /* Palette */
  --navy-950: #0c1626;
  --navy-900: #12203a;
  --navy-800: #1c3050;
  --navy-700: #2a4468;
  --cream-50: #fbf7ee;
  --cream-100: #f4ecda;
  --cream-200: #e9dcc0;
  --gold-400: #d4b878;
  --gold-500: #c6a15b;
  --gold-600: #a9843e;
  --seal-600: #9c2b2b;
  --ink-900: #1a1814;
  --ink-700: #3c3a34;
  --ink-500: #6b6860;
  --ink-300: #a39e91;
  --line: rgba(26, 24, 20, 0.12);
  --line-on-dark: rgba(251, 247, 238, 0.16);

  /* Typography */
  --font-display: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --font-body: "Zen Kaku Gothic New", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale (spacious) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  /* Misc */
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 1240px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  background: var(--cream-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-5); }
}

/* Visually hidden but accessible */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--navy-900); color: var(--cream-50);
  padding: 0.75rem 1.25rem; z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 600;
}
.eyebrow--on-dark { color: var(--gold-400); }

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.15;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.3;
}
.lede {
  font-size: 1.1rem;
  color: var(--ink-700);
  max-width: 46ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--navy-900);
  color: var(--cream-50);
  border-color: var(--navy-900);
}
.btn-primary:hover { background: var(--navy-800); }
.btn-gold {
  background: var(--gold-500);
  color: var(--navy-950);
  border-color: var(--gold-500);
}
.btn-gold:hover { background: var(--gold-400); }
.btn-outline {
  background: transparent;
  color: var(--cream-50);
  border-color: var(--line-on-dark);
}
.btn-outline:hover { background: rgba(251,247,238,0.08); border-color: var(--gold-400); }
.btn-ghost {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--navy-900); }
.btn[disabled], .btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
.btn-full { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand__logo { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.footer-brand__logo { width: 88px; height: 88px; border-radius: 50%; }
.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-4);
}
.main-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-700);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy-900); border-color: var(--gold-500); }
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  color: var(--navy-900);
}
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--cream-50);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; padding: var(--space-2) var(--space-3) var(--space-3); gap: var(--space-1); }
.mobile-nav a { font-size: 0.95rem; font-weight: 600; padding-block: 0.5rem; display: block; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* Header transparent par-dessus l'intro vidéo (accueil) */
.site-header { transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease); }
.site-header--over:not(.is-scrolled) {
  position: fixed;
  left: 0; right: 0;
  background: linear-gradient(180deg, rgba(12,22,38,0.7) 0%, rgba(12,22,38,0.45) 60%, rgba(12,22,38,0) 100%);
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header--over.is-scrolled { position: fixed; left: 0; right: 0; }
.site-header--over:not(.is-scrolled) .main-nav a,
.site-header--over:not(.is-scrolled) .nav-toggle { color: var(--cream-50); text-shadow: 0 1px 8px rgba(12,22,38,0.6); }
.site-header--over:not(.is-scrolled) .main-nav a:hover,
.site-header--over:not(.is-scrolled) .main-nav a[aria-current="page"] { color: var(--cream-50); border-color: var(--gold-400); }

/* ---------- Hero (intro vidéo plein écran, sans texte) ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  background: var(--navy-950);
  overflow: hidden;
}
.hero__media,
.hero__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__media { object-fit: cover; z-index: 1; opacity: 0; transition: opacity 0.8s var(--ease); }
.hero__media.is-playing { opacity: 1; }
.hero__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, var(--navy-800) 0%, var(--navy-950) 72%) center / cover no-repeat;
}
.hero__logo { width: min(52vmin, 384px); height: auto; border-radius: 50%; }
.hero__fallback.has-poster .hero__logo { display: none; }
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(12,22,38,0.35) 0%, rgba(12,22,38,0) 22%);
}
.hero__cta {
  position: absolute;
  left: 50%;
  bottom: clamp(56px, 13vh, 140px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  min-height: 52px;
  color: var(--gold-400);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--gold-400);
  border-radius: 999px;
  background: rgba(12, 22, 38, 0.62);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), visibility 0s linear 0.9s, background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.hero__cta.is-shown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
.hero__cta:hover { background: var(--gold-400); color: var(--navy-950); }
.hero__cta svg { transition: transform 0.25s var(--ease); }
.hero__cta:hover svg { transform: translateX(4px); }
@media (max-width: 420px) { .hero__cta { padding-inline: 1.4rem; font-size: 0.78rem; letter-spacing: 0.1em; } }
/* ---------- Section rhythm ---------- */
.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }
.section--navy { background: var(--navy-900); color: var(--cream-50); }
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
@media (min-width: 860px) {
  .section-head--row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* ---------- Intro strip ---------- */
.intro-strip {
  border-block: 1px solid var(--line);
  padding-block: var(--space-3);
}
.intro-strip p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-align: center;
  max-width: 32ch;
  margin-inline: auto;
  color: var(--ink-700);
}

/* ---------- Category filter ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.filter-btn {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-700);
  background: transparent;
  transition: all 0.2s var(--ease);
}
.filter-btn:hover { border-color: var(--navy-900); }
.filter-btn.is-active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--cream-50);
}

/* ---------- Product grid & card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3) var(--space-2);
  padding-bottom: var(--space-4);
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4) var(--space-3); } }
@media (min-width: 1080px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

/* Décalage vertical léger : rythme organique plutôt que grille rigide */
.product-grid .product-card:nth-child(even) { margin-top: 1.6rem; }
@media (min-width: 640px) and (max-width: 1079px) {
  .product-grid .product-card:nth-child(even) { margin-top: 0; }
  .product-grid .product-card:nth-child(3n+2) { margin-top: 2.4rem; }
}
@media (min-width: 1080px) { .product-grid .product-card:nth-child(even) { margin-top: 2.6rem; } }

.product-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 25%, var(--cream-50) 0%, var(--cream-100) 55%, var(--cream-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 16px 30px -22px rgba(12, 22, 38, 0.5);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.product-card:hover .product-card__media,
.product-card > a:focus-visible .product-card__media {
  transform: translateY(-6px);
  box-shadow: 0 26px 36px -22px rgba(12, 22, 38, 0.55);
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.05); }
.product-card__kamon { width: 34%; height: 34%; opacity: 0.35; }
.product-card__badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  background: rgba(251, 247, 238, 0.92);
  color: var(--navy-900);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
}
.product-card__body {
  padding: 1rem 0.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.product-card__cat {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 700;
}
.product-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy-900);
  line-height: 1.3;
}
.product-card__tagline {
  font-size: 0.85rem;
  color: var(--ink-500);
  flex: 1;
}
.product-card__foot {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.product-card__price {
  background: var(--navy-900);
  color: var(--cream-50);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.product-card__link {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-900);
  border-bottom: 1px solid var(--gold-500);
  transition: color 0.2s var(--ease);
}
.product-card:hover .product-card__link { color: var(--gold-600); }
.empty-note {
  padding: var(--space-4);
  text-align: center;
  color: var(--ink-500);
  border: 1px dashed var(--line);
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 860px) {
  .product-detail { grid-template-columns: 1.1fr 1fr; gap: var(--space-5); align-items: start; }
}
.product-detail__media {
  aspect-ratio: 1 / 1;
  background: linear-gradient(155deg, var(--cream-200) 0%, var(--cream-100) 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 40px -28px rgba(12, 22, 38, 0.5);
}
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__kamon { width: 40%; height: 40%; opacity: 0.22; }
.product-detail__price { font-size: 1.6rem; font-weight: 700; color: var(--navy-900); margin-top: var(--space-1); }
.product-detail__block { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.product-detail__block h2 { font-size: 1.3rem; margin-bottom: var(--space-1); }
.breadcrumb {
  font-size: 0.75rem;
  color: var(--ink-500);
  margin-bottom: var(--space-3);
}
.breadcrumb a:hover { color: var(--navy-900); }

/* ---------- Story / feature sections ---------- */
.story-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 860px) {
  .story-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
.story-grid__figure {
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-950));
  position: relative;
  overflow: hidden;
}
.story-grid__figure .kamon { position: absolute; inset: 0; margin: auto; width: 42%; height: 42%; opacity: 0.35; }

.value-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card { padding: var(--space-3); border: 1px solid var(--line); }
.value-card__icon { width: 30px; height: 30px; color: var(--gold-600); margin-bottom: var(--space-2); }
.value-card h3 { margin-bottom: 0.5rem; }
.value-card p { color: var(--ink-500); font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: var(--cream-200);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-6) var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-brand__word { font-family: var(--font-display); font-size: 1.6rem; color: var(--cream-50); }
.footer-brand p:not(.footer-brand__word) { margin-top: var(--space-2); color: var(--ink-300); max-width: 34ch; font-size: 0.9rem; }
.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--space-2);
}
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--cream-200); font-size: 0.9rem; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid var(--line-on-dark);
  padding-block: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-300);
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: var(--space-3); }
.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--ink-700);
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: var(--cream-50);
  color: var(--ink-900);
  border-radius: var(--radius);
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--navy-900);
  outline: none;
}
.form-note { font-size: 0.8rem; color: var(--ink-500); margin-top: var(--space-2); }
.form-status { margin-top: var(--space-2); font-size: 0.9rem; }
.form-status[data-state="success"] { color: #2f6b3a; }
.form-status[data-state="error"] { color: var(--seal-600); }
.honeypot { position: absolute; left: -9999px; }

/* ---------- Legal pages ---------- */
.legal-content h2 { margin-top: var(--space-4); margin-bottom: var(--space-1); font-size: 1.25rem; }
.legal-content p, .legal-content li { color: var(--ink-700); margin-bottom: var(--space-1); }
.legal-content ul { list-style: disc; padding-left: 1.4rem; }

/* Utility */
.mt-0 { margin-top: 0; }
.visually-loading { opacity: 0; }
.is-visible { opacity: 1; transition: opacity 0.6s var(--ease); }

/* ---------- Commerce : même palette et mêmes proportions ---------- */
.narrow { max-width: 70ch; margin-inline: auto; }
.commerce-form { margin-top: var(--space-4); }
.form-field select { width: 100%; padding: 0.75rem; border: 1px solid var(--line); background: var(--cream-50); color: var(--ink-900); }
.cart-layout { display: grid; gap: var(--space-4); margin-top: var(--space-3); }
.cart-item { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2); align-items: start; padding-block: var(--space-3); border-bottom: 1px solid var(--line); }
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 18px; }
.cart-item__title { font-size: 1.1rem; line-height: 1.4; }
.cart-item input { width: 4.5rem; padding: 0.4rem; margin: 0.6rem; background: var(--cream-50); border: 1px solid var(--line); }
.cart-remove { border: 0; background: transparent; color: var(--seal-600); text-decoration: underline; padding: 0.5rem; }
.cart-summary, .order-card { background: var(--cream-100); border: 1px solid var(--line); padding: var(--space-3); border-radius: 18px; align-self: start; }
.cart-summary h2 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.summary-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-block: 0.8rem; }
.summary-total { padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.2rem; }
.check-label { display: block; margin-block: var(--space-3); font-size: 0.9rem; }
.check-label input { margin-right: 0.5rem; accent-color: var(--navy-900); }
.check-label a, .form-note a { text-decoration: underline; text-underline-offset: 3px; }
.cart-toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--navy-900); color: var(--cream-50); border: 1px solid var(--gold-500); border-radius: 999px; padding: 0.8rem 1.5rem; z-index: 100; width: max-content; max-width: calc(100% - 2rem); text-align: center; }
.order-reference { overflow-wrap: anywhere; margin-block: var(--space-2); color: var(--ink-500); font-size: 0.85rem; }
.admin-table-wrap { overflow-x: auto; margin-block: var(--space-3); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table input[type="number"] { width: 5.5rem; padding: 0.4rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-block: var(--space-3); }
.admin-message { border: 1px solid var(--line); padding: var(--space-2); margin-block: var(--space-2); }
.admin-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-address { white-space: pre-wrap; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); } }
@media (max-width: 500px) { .cart-item { grid-template-columns: 65px 1fr; } .cart-item img { width: 65px; height: 65px; } .cart-item > strong { grid-column: 2; } }
