:root {
  /* Base papier / crème */
  --paper: #FAF5EC;
  --paper-deep: #F1EADC;
  --card: #FFFDF8;

  /* Couleurs de marque issues des SVG */
  --ink: #0C001D;      /* BillyDoo.svg */
  --ink-soft: #544A5E;
  --coral: #E84362;    /* billydoo_picto.svg */
  --orange: #F4A061;   /* billydoo_picto.svg */
  --peach: #F29161;    /* favorite.svg / star.svg */

  --gradient: linear-gradient(90deg, var(--coral), var(--orange));
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 10px 30px rgba(232, 67, 98, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

/* Texture grain papier, en overlay très léger sur toute la page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

p { line-height: 1.6; color: var(--ink-soft); }

a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon-inline {
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  color: var(--coral);
}

/* Texture pétillante (favorite/star), instances injectées en JS */
#sparkle-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  opacity: 0;
  transform: rotate(var(--rot, 0deg)) scale(1);
  will-change: opacity, transform;
  animation: sparkle 6s ease-in-out infinite;
}
@keyframes sparkle {
  0%   { opacity: 0; transform: translateY(0) rotate(var(--rot, 0deg)) scale(1); }
  45%  { opacity: var(--peak, 0.14); transform: translateY(-3px) rotate(var(--rot, 0deg)) scale(1.15); }
  100% { opacity: 0; transform: translateY(-6px) rotate(var(--rot, 0deg)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .sparkle { animation: none; opacity: var(--peak, 0.12); }
  html { scroll-behavior: auto; }
}

/* Scroll reveal — classes posées en JS : sans JS, tout reste visible */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Easter egg */
.egg-toast {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  z-index: 100;
  background: var(--card);
  border: 1px solid rgba(232, 67, 98, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 14px 22px;
  font-family: 'Permanent Marker', cursive;
  font-size: 17px;
  color: var(--coral);
  max-width: min(90vw, 420px);
  text-align: center;
  animation: egg-toast 3.8s ease forwards;
}
@keyframes egg-toast {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-12px) rotate(-2deg); }
  8%   { opacity: 1; transform: translateX(-50%) translateY(0) rotate(-2deg); }
  88%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px) rotate(-2deg); }
}
.egg-burst {
  position: fixed;
  top: -40px;
  z-index: 99;
  pointer-events: none;
  animation: egg-fall linear forwards;
}
@keyframes egg-fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  10%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(105vh) rotate(var(--rot, 180deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .egg-toast { animation: none; }
  .egg-burst { display: none; }
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 236, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(12, 0, 29, 0.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}
.logo { display: block; }
.logo-nav { height: 32px; width: auto; }
.logo-footer { height: 28px; width: auto; }
.logo-link { display: inline-flex; align-items: center; }

.nav-links {
  display: none;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: 13px; white-space: nowrap; }
.btn-primary { font-size: 15px; padding: 16px 32px; }

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 40px;
  padding: 48px 24px 60px;
}
.badge {
  display: inline-block;
  background: var(--card);
  border: 1px solid rgba(232, 67, 98, 0.2);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 34px;
  margin-bottom: 20px;
}
.lead {
  font-size: 17px;
  max-width: 460px;
  margin-bottom: 28px;
}

.hero-cta { margin-bottom: 28px; }

.store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: white;
  padding: 10px 20px;
  border-radius: 14px;
}
.store-btn small { display: block; font-size: 10px; opacity: 0.8; }
/* apple_logo.webp est un bitmap noir sur transparent : on l'inverse en
   blanc pour matcher le fond sombre du bouton (les autres icônes du bouton
   sont des SVG en currentColor, déjà blancs nativement). */
.apple-logo-icon { filter: brightness(0) invert(1); }
.store-btn strong { display: block; font-size: 16px; font-family: 'Unbounded', sans-serif; }

/* Badges stores inactifs (pré-lancement) */
.store-btn.is-disabled {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: default;
  user-select: none;
}

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-soft);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  order: -1;
}
.phone-frame {
  width: 100%;
  max-width: 320px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(232, 67, 98, 0.25);
}
.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.floating-card {
  position: absolute;
  background: var(--card);
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(12, 0, 29, 0.12);
  animation: float 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-1 { top: 10%; left: -10px; }
.card-2 { bottom: 12%; right: -10px; animation-delay: 1s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .floating-card { animation: none; }
}

/* STEPS */
.steps {
  padding: 64px 24px;
  text-align: center;
}
.steps h2 { font-size: 26px; margin-bottom: 12px; }
.section-sub {
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 15px;
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.step-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 18px; margin-bottom: 10px; }
.step-card p { font-size: 14px; }

/* SHOWCASE */
.showcase {
  background: var(--paper-deep);
  padding: 64px 0;
  text-align: center;
}
.showcase h2 { font-size: 26px; margin-bottom: 12px; }
.showcase-grid {
  display: grid;
  grid-auto-flow: column;
  /* Colonnes qui épousent la largeur naturelle de l'image (hauteur fixée
     ci-dessous), pas un pourcentage du viewport : sinon "afficher en entier"
     et "hauteur réduite" imposent un recadrage. */
  grid-auto-columns: max-content;
  gap: 20px;
  margin-top: 48px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.showcase-grid::-webkit-scrollbar { display: none; }
.showcase-item { margin: 0; scroll-snap-align: center; }
.showcase-item img {
  /* Mobile : hauteur réduite, largeur laissée libre (ratio conservé) —
     image entière, jamais rognée. */
  height: 320px;
  width: auto;
  max-width: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: block;
}
.showcase-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(12, 0, 29, 0.15);
  transition: background 0.2s, transform 0.2s;
}
.showcase-dot.is-active {
  background: var(--coral);
  transform: scale(1.3);
}
.showcase-item figcaption {
  margin-top: 16px;
  font-family: 'Permanent Marker', cursive;
  font-size: 17px;
  color: var(--coral);
  transform: rotate(-1.2deg);
}

/* FEATURES */
.features-section {
  padding: 64px 24px;
  text-align: center;
}
.features-section h2 { font-size: 26px; margin-bottom: 40px; }
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.feature {
  background: var(--card);
  border: 1px solid rgba(12, 0, 29, 0.06);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(232, 67, 98, 0.10);
  color: var(--coral);
  margin-bottom: 14px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { font-size: 13px; }

/* RITUELS */
.rituals {
  padding: 40px 24px 80px;
  text-align: center;
}
.rituals h2 { font-size: 26px; margin-bottom: 12px; }
.rituals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.ritual-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.ritual-card .feature-icon {
  background: rgba(242, 145, 97, 0.16);
  color: var(--peach);
}
.ritual-card h3 { font-size: 17px; margin-bottom: 10px; }
.ritual-card p { font-size: 14px; }

/* FAQ */
.faq {
  padding: 0 24px 80px;
  max-width: 760px;
}
.faq h2 { font-size: 26px; text-align: center; margin-bottom: 32px; }
.faq-item {
  background: var(--card);
  border: 1px solid rgba(12, 0, 29, 0.07);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  padding: 0 20px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 18px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Unbounded', sans-serif;
  color: var(--coral);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  font-size: 14px;
  margin: 0 0 18px;
}

/* CTA FINAL / WAITLIST */
.cta-final {
  background: var(--gradient);
  padding: 72px 24px;
  color: white;
  text-align: center;
}
.cta-inner h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.cta-inner > p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.email-form {
  max-width: 480px;
  margin: 36px auto 0;
  text-align: left;
}
.email-form-label {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
  text-align: center;
}
.email-form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.email-form-row input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
}
.email-form-row button {
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  background: var(--ink);
  color: white;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.email-form-row button:hover { transform: translateY(-2px); }
.email-form-row button:disabled { opacity: 0.6; cursor: wait; transform: none; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}
.consent input {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--ink);
}
.consent a {
  text-decoration: underline;
  color: white;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.email-form-feedback {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  color: white;
  text-align: center;
}
.email-form-feedback.is-error {
  color: #FFE1D6;
}

/* FOOTER */
.footer {
  padding: 40px 24px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}
.footer-links a:hover { color: white; }
.footer p { color: rgba(255, 255, 255, 0.5); font-size: 13px; margin: 0; }
.footer .icon-inline { color: var(--peach); }

/* PAGE 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-heart {
  width: 56px;
  height: 56px;
  color: var(--coral);
  margin-bottom: 24px;
  transform: rotate(-8deg);
}
.error-page h1 { font-size: 26px; margin-bottom: 12px; max-width: 560px; }
.error-note {
  font-family: 'Permanent Marker', cursive;
  color: var(--coral);
  margin-bottom: 32px;
}

/* PAGES LÉGALES */
.legal {
  padding: 48px 24px 80px;
  max-width: 760px;
}
.legal h1 { font-size: 28px; margin-bottom: 24px; }
.legal h2 { font-size: 18px; margin: 32px 0 12px; }
.legal h3 { font-size: 15px; margin: 20px 0 8px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin-bottom: 8px; }

/* RESPONSIVE — mobile-first, on élargit */
@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .email-form-row { flex-direction: row; }
  .store-buttons { justify-content: flex-start; width: auto; }
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 80px 24px 60px;
  }
  .hero-visual { order: 0; margin-bottom: 0; }
  .hero h1 { font-size: 46px; }
  .nav-links { display: flex; }
  .steps-grid, .showcase-grid, .rituals-grid { grid-template-columns: repeat(3, 1fr); }
  /* Showcase a 4 visuels (pas 3) : les 4 sur une ligne plutôt qu'en slider
     (le slider horizontal ci-dessus est réservé au mobile). */
  .showcase-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
  .showcase-item img { width: 100%; height: auto; max-width: none; }
  .showcase-dots { display: none; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .steps h2, .showcase h2, .features-section h2, .rituals h2, .faq h2 { font-size: 32px; }
  .cta-inner h2 { font-size: 34px; }
  .card-2 { right: -20px; }
}
