/* Emori — site vitrine
   Direction « Carnet précieux » : ivoire, bordeaux, empattements Newsreader.
   Bascule clair/sombre exclusivement selon le système (comme l'application). */

:root {
  /* Clair — « Carnet précieux » */
  --page: #f6f3ed;
  --surface: #fcf9f5;
  --surface-soft: #eee6e2;
  --selected: #e8d6d5;
  --ink: #302b27;
  --muted: #706660;
  --accent: #75464c;
  --on-accent: #fcf8f3;
  --hairline: #ded2ce;
  --shadow: 24px 40px 80px -40px rgba(48, 43, 39, 0.35);
  --shadow-soft: 0 2px 24px -12px rgba(48, 43, 39, 0.25);

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  --max: 1080px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Sombre — « Refuge du soir » */
    --page: #242124;
    --surface: #332c31;
    --surface-soft: #302a2e;
    --selected: #42343b;
    --ink: #efe8e0;
    --muted: #beb1b6;
    --accent: #d3a4ab;
    --on-accent: #302126;
    --hairline: #493d43;
    --shadow: 24px 40px 90px -40px rgba(0, 0, 0, 0.6);
    --shadow-soft: 0 2px 24px -12px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection {
  background: var(--selected);
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  padding: 24px 0 8px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: block;
}
.brand .word {
  letter-spacing: 0.2px;
}
.nav-legal {
  display: flex;
  gap: 22px;
  font-size: 15px;
}
.nav-legal a {
  color: var(--muted);
}
.nav-legal a:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 38px 0 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero > .wrap {
  position: relative;
  z-index: 2;
}
.hero .icon-badge {
  width: 78px;
  height: 78px;
  border-radius: 19px;
  box-shadow: var(--shadow-soft);
  margin: 0 auto 18px;
  display: block;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  max-width: 16ch;
  margin: 0 auto 14px;
}
.hero .lede {
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.5;
  max-width: 40ch;
  margin: 0 auto 26px;
}

.hero-figure {
  margin: 28px auto 0;
  max-width: 360px;
}
.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Boutons de téléchargement ---------- */
.stores {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--page);
  min-width: 208px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.store-badge:hover {
  text-decoration: none;
  transform: translateY(-2px);
  opacity: 0.94;
}
.store-badge svg {
  flex: 0 0 auto;
}
.store-badge .label {
  text-align: left;
  line-height: 1.15;
}
.store-badge .label small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.4px;
  opacity: 0.85;
  text-transform: uppercase;
}
.store-badge .label strong {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.store-note {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- Mockups téléphone ---------- */
.showcase {
  padding: 8px 0 24px;
}
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(16px, 4vw, 48px);
  flex-wrap: wrap;
}
.phone {
  width: clamp(210px, 30vw, 262px);
  border-radius: 42px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.phone.lift {
  margin-bottom: 28px;
}
.phone img {
  width: 100%;
  display: block;
  border-radius: 33px;
}
.phone .light-only {
  display: block;
}
.phone .dark-only {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .phone .light-only {
    display: none;
  }
  .phone .dark-only {
    display: block;
  }
}

/* ---------- Sections « valeurs » ---------- */
.features {
  padding: 64px 0 40px;
}
.features h2,
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 38px);
  text-align: center;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 44px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
}
.card .glyph {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--selected);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--accent);
}
.card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 8px;
}
.card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- Bande confiance ---------- */
.trust {
  padding: 24px 0 8px;
}
.trust .panel {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  text-align: center;
}
.trust .panel h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 32px);
  margin-bottom: 10px;
}
.trust .panel p {
  color: var(--muted);
  max-width: 54ch;
  margin: 0 auto;
}

/* ---------- CTA final ---------- */
.cta {
  padding: 72px 0 40px;
  text-align: center;
}
.cta h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.4px;
  margin-bottom: 28px;
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding: 40px 0 56px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
}
.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 15px;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-meta {
  font-size: 13.5px;
  color: var(--muted);
}
.footer-meta a {
  color: var(--muted);
  text-decoration: underline;
}

/* ---------- Pages légales ---------- */
.legal {
  padding: 48px 0 24px;
}
.legal .doc {
  max-width: 720px;
  margin: 0 auto;
}
.legal .eyebrow {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.legal h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}
.legal .updated {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 36px;
}
.legal h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  margin: 40px 0 12px;
  letter-spacing: -0.2px;
}
.legal h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 26px 0 8px;
}
.legal p,
.legal li {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}
.legal p {
  margin-bottom: 16px;
}
.legal ul,
.legal ol {
  margin: 0 0 18px 22px;
}
.legal li {
  margin-bottom: 8px;
}
.legal strong {
  font-weight: 600;
}
.legal .callout {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 24px 0;
}
.legal .callout p:last-child {
  margin-bottom: 0;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 15.5px;
}
.legal th,
.legal td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.legal th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
}
.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.toc {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 36px;
}
.toc p {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 15px;
}
.toc ol {
  margin: 0 0 0 18px;
}
.toc li {
  margin-bottom: 4px;
  font-size: 15.5px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .site-header {
    padding-bottom: 4px;
  }
  .site-header .wrap {
    flex-direction: column;
    gap: 12px;
  }
  .nav-legal {
    gap: 18px;
    font-size: 15px;
  }
  .hero {
    padding-top: 28px;
  }
  .phone.lift {
    margin-bottom: 0;
  }
}

@media (max-width: 460px) {
  .stores {
    flex-direction: column;
    align-items: stretch;
  }
  .store-badge {
    min-width: 0;
    justify-content: center;
  }
}

/* ---------- Fond animé « shape hero » (adapté de @kokonutui/shape-hero, palette Emori) ---------- */
:root {
  --sh-bordeaux: rgba(117, 70, 76, 0.22);
  --sh-rose: rgba(211, 164, 171, 0.3);
  --sh-mauve: rgba(150, 96, 106, 0.22);
  --sh-taupe: rgba(199, 154, 146, 0.22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --sh-bordeaux: rgba(117, 70, 76, 0.36);
    --sh-rose: rgba(211, 164, 171, 0.24);
    --sh-mauve: rgba(180, 120, 132, 0.26);
    --sh-taupe: rgba(211, 164, 171, 0.14);
  }
}

.shape-hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* le contenu passe au-dessus du fond fixe */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}
/* teinte diagonale douce, comme le dégradé de fond de l'original */
.shape-hero-bg::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: linear-gradient(
    135deg,
    rgba(117, 70, 76, 0.05),
    transparent 55%,
    rgba(211, 164, 171, 0.06)
  );
  filter: blur(60px);
}
/* vignette haut/bas : les formes se fondent dans la page */
.shape-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--page), transparent 10%),
    linear-gradient(to top, var(--page), transparent 16%);
}

.shape {
  position: absolute;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.shape-spin {
  display: block;
  opacity: 1;
  transform: rotate(var(--r));
  animation: shape-drop-in 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) both;
  animation-delay: var(--d);
}
.shape-inner {
  display: block;
  position: relative;
  box-shadow: 0 2px 22px -8px rgba(117, 70, 76, 0.22);
  animation: shape-float 12s ease-in-out infinite;
}
.shape-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.14),
    transparent 70%
  );
}

/* Positions, tailles, rayons, rotations, couleurs et délais — repris de shape-hero */
.s1 {
  --r: -8deg;
  --d: 0.3s;
  top: -12%;
  left: -14%;
}
.s1 .shape-inner {
  width: 300px;
  height: 460px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--sh-bordeaux), transparent 78%);
}
.s2 {
  --r: 15deg;
  --d: 0.5s;
  right: -18%;
  bottom: -8%;
}
.s2 .shape-inner {
  width: 560px;
  height: 200px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--sh-rose), transparent 80%);
}
.s3 {
  --r: 24deg;
  --d: 0.4s;
  top: 42%;
  left: -6%;
}
.s3 .shape-inner {
  width: 280px;
  height: 280px;
  border-radius: 32px;
  background: linear-gradient(90deg, var(--sh-mauve), transparent 78%);
}
.s4 {
  --r: -20deg;
  --d: 0.6s;
  top: 4%;
  right: 8%;
}
.s4 .shape-inner {
  width: 240px;
  height: 96px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--sh-taupe), transparent 80%);
}
.s5 {
  --r: 35deg;
  --d: 0.7s;
  top: 50%;
  right: -12%;
}
.s5 .shape-inner {
  width: 380px;
  height: 140px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--sh-rose), transparent 80%);
}
.s6 {
  --r: -25deg;
  --d: 0.2s;
  bottom: 8%;
  left: 18%;
}
.s6 .shape-inner {
  width: 190px;
  height: 190px;
  border-radius: 28px;
  background: linear-gradient(90deg, var(--sh-bordeaux), transparent 78%);
}
.s7 {
  --r: 45deg;
  --d: 0.8s;
  top: 12%;
  left: 42%;
}
.s7 .shape-inner {
  width: 150px;
  height: 78px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--sh-mauve), transparent 80%);
}
.s8 {
  --r: -12deg;
  --d: 0.9s;
  top: 62%;
  left: 24%;
}
.s8 .shape-inner {
  width: 420px;
  height: 110px;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--sh-taupe), transparent 82%);
}

@keyframes shape-drop-in {
  0% {
    opacity: 0;
    transform: translateY(-60px) rotate(calc(var(--r) - 15deg));
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--r));
  }
}
@keyframes shape-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .store-badge:hover {
    transform: none;
  }
  .shape-spin,
  .shape-inner {
    animation: none;
  }
}
