/* Ramène ton Tup à Mémé — mini-site. Mêmes couleurs et contrastes que l'application.
   Aucune police ni script à télécharger : la page reste légère et ne collecte rien. */
:root {
  --cream: #fff8eb;
  --surface: #ffffff;
  --surface-alt: #fbebd3;
  --border: #ebdcc6;
  --text: #49382b;
  --muted: #6e5a4a;
  --orange: #f28c45;
  --orange-soft: #fde3cf;
  --orange-text: #9a4e17;
  --olive: #718355;
  --olive-text: #55663d;
  --olive-soft: #e7ecdd;
  --red: #e87568;
  --danger-text: #a8443a;
  --danger-soft: #fbe1dd;
  --tape: #f1e3bd;
  --radius: 20px;
  /* Arrondie quand le système en a une (iPhone, Mac), sinon la police du téléphone */
  --round: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI Variable Display', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* L'écriture au feutre de Mémé sur le scotch */
  --marker: 'Segoe Print', 'Bradley Hand', 'Chalkboard SE', 'Comic Neue', cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, h3, .code { font-family: var(--round); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: clamp(1.45rem, 4.5vw, 1.9rem); letter-spacing: -0.01em; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.25rem; }
p { margin: 0 0 0.75rem; }

a { color: var(--orange-text); font-weight: 700; text-underline-offset: 0.15em; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 36rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------------------------------------------------------------- En-tête et pied de page */
.site-header { padding: 1rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-family: var(--round); font-weight: 700; font-size: 1.1rem; }
.brand img { width: 2.75rem; height: 2.75rem; }

footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 2rem 0 2.5rem; color: var(--muted); font-size: 1rem; text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; }

/* ---------------------------------------------------------------- Accueil : la boîte de Mémé */
.hero { padding: 1.5rem 0 3rem; }
.hero .wrap { display: grid; gap: 2rem; align-items: center; }
.hero-text .lead { font-size: 1.25rem; color: var(--muted); max-width: 32rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-actions .button { width: auto; }

/* Sur téléphone, Mémé passe avant le titre : c'est elle qu'on voit en premier */
.scene { position: relative; width: min(15rem, 70%); margin: 0 auto 2rem; order: -1; container-type: inline-size; }
.scene .meme { display: block; width: 86%; height: auto; margin: 0 auto; }
/* La grande boîte posée dans les mains de Mémé */
.tup { position: absolute; left: 4%; right: 4%; bottom: -12%; }
.tup-lid {
  position: relative;
  height: 11cqw;
  margin: 0 -4%;
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: 14px;
  z-index: 1;
  transform-origin: 10% 100%;
  animation: lid 1.1s 0.4s ease-in-out both;
}
.tup-body {
  height: 25cqw;
  margin-top: -6px;
  background: var(--orange);
  border: 3px solid var(--text);
  border-radius: 6px 6px 22px 22px;
}
/* Le scotch avec le nom au feutre, comme sur les vraies boîtes */
.tape {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max-content;
  max-width: 108%;
  padding: 0.15rem 0.9rem;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(73, 56, 43, 0.2);
  font-family: var(--marker);
  font-size: clamp(0.8rem, 5.5cqw, 1.2rem);
  line-height: 1.5;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-3deg);
  clip-path: polygon(2% 0, 98% 6%, 100% 100%, 0 94%);
}
@keyframes lid {
  0% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-22px) rotate(-6deg); }
  65% { transform: translateY(-22px) rotate(-6deg); }
  100% { transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .tup-lid { animation: none; } }

@media (min-width: 52rem) {
  .hero { padding: 3rem 0 4.5rem; }
  .hero .wrap { grid-template-columns: 1.2fr 0.8fr; gap: 3rem; }
  .scene { width: 100%; max-width: 24rem; order: 0; margin-bottom: 1.5rem; }
}

/* ---------------------------------------------------------------- Sections de l'accueil */
section { padding: 2.5rem 0; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: flex; gap: 0.9rem; align-items: flex-start; }
.steps li::before {
  content: counter(step);
  flex: 0 0 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--olive-soft);
  color: var(--olive-text);
  font: 700 1.15rem/2.5rem var(--round);
  text-align: center;
}
.how .steps { max-width: 40rem; }
@media (min-width: 52rem) {
  .how .steps { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 2rem; }
  .how .steps li { flex-direction: column; }
  .how .steps li::before { flex: none; width: 2.5rem; }
}

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem 2.5rem; }
.features li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 0 0.9rem; }
.features .icon { grid-row: span 2; font-size: 1.9rem; line-height: 1; padding-top: 0.15rem; }
.features p { color: var(--muted); margin: 0; }
@media (min-width: 52rem) { .features { grid-template-columns: 1fr 1fr; } }

/* Un verdict du Tribunal, présenté comme le billet que Mémé glisserait dans la boîte */
.verdict {
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 6px;
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 34rem;
  margin: 0 auto;
  box-shadow: 6px 6px 0 var(--orange);
  transform: rotate(-1deg);
}
.verdict .prize { font-family: var(--round); font-weight: 700; font-size: 1.3rem; margin-bottom: 0.25rem; }
.verdict .ruling { font-size: 1.15rem; }
.verdict .signature { font-family: var(--marker); text-align: right; color: var(--orange-text); margin: 0; }

.reassure { background: var(--olive-soft); }
.reassure .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: center; justify-content: space-between; }
.reassure p { margin: 0; font-size: 1.15rem; color: var(--olive-text); font-weight: 700; }

.closing { text-align: center; }
.closing .lead { color: var(--muted); max-width: 32rem; margin: 0 auto 1.5rem; }
.closing .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------- Boutons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--text);
  background: var(--surface);
  color: var(--text);
  font: 800 1.1rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
}
.button + .button { margin-top: 0.75rem; }
.hero-actions .button + .button { margin-top: 0; }
/* Texte brun sur orange : contraste 4.6:1, comme dans l'app */
.button.primary { background: var(--orange); border-color: var(--orange); box-shadow: 0 6px 16px rgba(73, 56, 43, 0.16); }
.button.soon { border-style: dashed; border-color: var(--border); color: var(--muted); cursor: default; }

/* ---------------------------------------------------------------- Pages de texte */
.page-title { text-align: center; padding: 1rem 0 1.5rem; }
.page-title h1 { font-size: clamp(1.9rem, 6vw, 2.4rem); margin-bottom: 0.5rem; }
.updated { color: var(--muted); font-size: 1rem; margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card.summary { background: var(--olive-soft); border-color: transparent; }
.card h2 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.card h2:not(:first-child) { margin-top: 1.25rem; }
.card ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
.card li { margin-bottom: 0.35rem; }
.card .steps { gap: 0.25rem; margin-bottom: 0.75rem; }
.card .steps li::before { flex-basis: 2.25rem; height: 2.25rem; line-height: 2.25rem; }

.muted { color: var(--muted); font-size: 1rem; }
.center { text-align: center; }

/* ---------------------------------------------------------------- Lien d'invitation (étape 11) */
.code-box { background: var(--orange-soft); border-radius: 12px; padding: 1rem 0.5rem; text-align: center; margin: 0.5rem 0 0.75rem; }
.code { font-size: clamp(1.9rem, 9vw, 2.4rem); letter-spacing: 0.12em; white-space: nowrap; margin: 0; padding-left: 0.12em; user-select: all; -webkit-user-select: all; }
.notice { border-radius: 12px; padding: 0.75rem 1rem; font-weight: 700; }
.notice.ok { background: var(--olive-soft); color: var(--olive-text); }
.notice.error { background: var(--danger-soft); color: var(--danger-text); }
.stores { display: grid; gap: 0.75rem; }

[hidden] { display: none !important; }
