/* Talaref — site statique (Cloudflare Pages).
   Palette et ton : docs/DESIGN.md et Talaref/Theme/Theme.swift. Aucune autre couleur. */

:root {
  --bg: #1A1024;
  --bg-deep: #110A1A;
  --surface: #2A1B3D;
  --surface-2: #372450;
  --surface-3: #452E62;
  --gold: #F5C542;
  --gold-deep: #D9A72A;
  --ink: #F5EDE4;
  --muted: #B9A7CE;
  --good: #4ADE80;
  --bad: #F87171;
  --on-gold: #1A1024;
  --r-card: 24px;
  --r-choice: 18px;
  --r-chip: 14px;
  --font-ui: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-quote: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --max: 1100px;
  --pad: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 60%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: var(--gold); }
strong, b { font-weight: 700; }

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

/* Focus clavier : toujours visible, or sur fond sombre (AA). */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 12px;
  background: var(--gold); color: var(--on-gold); font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(26, 16, 36, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(245, 237, 228, 0.07);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; border-radius: 10px;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: none; gap: 24px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; border-radius: 6px; }
.nav a:hover { color: var(--ink); }
@media (min-width: 760px) { .nav { display: flex; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: 1.0625rem; text-decoration: none; cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, background-color 150ms ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--on-gold);
  box-shadow: 0 12px 32px rgba(245, 197, 66, 0.22);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--surface-3); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 20px 0 14px;
  background: #000; color: #fff; border: 1px solid #a6a6a6; border-radius: 12px;
  text-decoration: none; line-height: 1.05;
  transition: transform 150ms ease, background-color 150ms ease;
}
.store-badge:hover { background: #151515; }
.store-badge:active { transform: scale(0.97); }
.store-badge svg { width: 26px; height: 26px; fill: #fff; flex: none; }
.store-badge small { display: block; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.01em; }
.store-badge b { display: block; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 48px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: 30% -20% -30% -20%; pointer-events: none;
  background: radial-gradient(ellipse at 72% 55%, rgba(245, 197, 66, 0.16), transparent 58%);
}
.hero .wrap { position: relative; display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 84px 0 72px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
}
.overline {
  display: inline-block; font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
}
.hero h1 { font-size: clamp(3.2rem, 11vw, 5.8rem); margin: 10px 0 18px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: clamp(1.125rem, 2.2vw, 1.35rem); color: var(--muted); max-width: 34rem; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin: 20px 0 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- Mock iPhone (écran Question), 100 % CSS ---------- */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: min(320px, 86vw); aspect-ratio: 9 / 19;
  padding: 10px; border-radius: 48px; background: #05030a;
  box-shadow: 0 0 0 2px #2b1c40, 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 120px rgba(245, 197, 66, 0.08);
  position: relative;
}
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 39px;
  background: linear-gradient(180deg, var(--bg), var(--bg-deep));
  display: flex; flex-direction: column; padding: 12px 14px 16px;
  font-size: 14px; line-height: 1.3;
}
.island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 27px; border-radius: 999px; background: #05030a; }
.status { display: flex; justify-content: space-between; padding: 4px 12px 0; font-size: 12px; font-weight: 700; }
.ph-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 26px; font-weight: 700; font-size: 13px; }
.ph-head .n { color: var(--muted); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.ph-head .s { color: var(--gold); }
.ph-card {
  position: relative; margin-top: 16px; padding: 28px 16px 22px; text-align: center;
  background: var(--surface); border: 1px solid var(--surface-2); border-radius: 20px;
}
.ph-card::before { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 48px; height: 3px; border-radius: 999px; background: rgba(245, 197, 66, 0.6); }
.ph-card .overline { font-size: 0.62rem; }
.ph-quote { font-family: var(--font-quote); font-size: 1.4rem; font-weight: 500; line-height: 1.3; margin: 10px 0 0; }
.ph-choices { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ph-choices li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 46px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--surface-2); border-radius: 14px;
  font-weight: 600; font-size: 0.95rem;
}
.ph-choices li i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; color: var(--on-gold); background: var(--on-gold); opacity: 0; }
.ph-reveal {
  position: absolute; left: 14px; right: 14px; bottom: 16px;
  padding: 14px 16px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid rgba(245, 197, 66, 0.45);
  font-size: 0.85rem; line-height: 1.35;
  opacity: 0; transform: translateY(24px);
}
.ph-reveal b { color: var(--good); font-size: 1rem; }
.ph-reveal .pts { float: right; color: var(--gold); font-weight: 900; font-size: 1.1rem; }
.ph-reveal .t { color: var(--gold); font-weight: 700; }
.ph-reveal .y { color: var(--muted); }

/* Boucle de démo : question → révélation, 9 s. Désactivée si l'utilisateur préfère moins d'animations. */
.ph-choices li.ok { animation: ph-ok 9s ease-in-out infinite; }
.ph-choices li.ok i { animation: ph-fade 9s ease-in-out infinite; }
.ph-choices li.dim { animation: ph-dim 9s ease-in-out infinite; }
.ph-reveal { animation: ph-reveal 9s ease-in-out infinite; }
@keyframes ph-ok {
  0%, 42% { background: var(--surface); color: var(--ink); border-color: var(--surface-2); }
  47%, 92% { background: var(--good); color: var(--on-gold); border-color: var(--good); }
  97%, 100% { background: var(--surface); color: var(--ink); border-color: var(--surface-2); }
}
@keyframes ph-fade { 0%, 42% { opacity: 0; } 47%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes ph-dim { 0%, 42% { color: var(--ink); } 47%, 92% { color: var(--muted); } 97%, 100% { color: var(--ink); } }
@keyframes ph-reveal {
  0%, 44% { opacity: 0; transform: translateY(24px); }
  49%, 92% { opacity: 1; transform: translateY(0); }
  97%, 100% { opacity: 0; transform: translateY(24px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-head { max-width: 42rem; margin-bottom: 32px; }
.section h2 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin: 8px 0 12px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section-foot { margin: 24px 0 0; color: var(--muted); font-size: 0.95rem; }
.fine { margin: 20px 0 0; color: var(--muted); font-size: 0.88rem; }

.grid-3 { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--surface-2); border-radius: var(--r-card); padding: 26px 24px; }
.card h3 { font-size: 1.25rem; margin: 14px 0 8px; }
.card p { margin: 0; color: var(--muted); }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--gold); color: var(--on-gold); font-weight: 900; font-size: 1.25rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chips li, .chip {
  display: inline-block; padding: 6px 12px; border-radius: var(--r-chip);
  background: var(--surface); border: 1px solid var(--surface-2);
  font-size: 0.85rem; font-weight: 700; color: var(--ink);
}
.chip { border: 0; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.75rem; font-weight: 800; }
.chip-good { background: rgba(74, 222, 128, 0.14); color: var(--good); }
.chip-gold { background: rgba(245, 197, 66, 0.14); color: var(--gold); }

/* Réf du jour */
.daily {
  display: grid; gap: 28px; padding: 28px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--surface-3); border-radius: 28px;
}
@media (min-width: 860px) { .daily { grid-template-columns: 1.2fr 0.8fr; align-items: center; padding: 44px; } }
.daily p { color: var(--muted); }
.daily p.small { font-size: 0.9rem; margin: 0; }
.share-card {
  padding: 24px; text-align: center;
  background: var(--bg-deep); border: 1px solid var(--surface-2); border-radius: 20px;
}
.share-card .score { font-size: 3.2rem; font-weight: 900; color: var(--gold); line-height: 1; letter-spacing: -0.02em; }
.share-card .squares { font-size: 1.5rem; letter-spacing: 0.08em; margin: 12px 0 8px; }
.share-card .meta { color: var(--muted); font-size: 0.9rem; }
.share-card .link { margin-top: 10px; color: var(--ink); font-weight: 700; }

/* Packs */
.packs { display: grid; gap: 16px; }
@media (min-width: 720px) { .packs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .packs { grid-template-columns: repeat(3, 1fr); } }
.pack {
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  background: var(--surface); border: 1px solid var(--surface-2); border-radius: var(--r-card);
}
.pack .emoji { font-size: 2rem; line-height: 1; }
.pack h3 { font-size: 1.2rem; }
.pack p { margin: 0; color: var(--muted); flex: 1; }
.pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.price { font-weight: 900; font-size: 1.25rem; color: var(--gold); }
.pack-all { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(245, 197, 66, 0.16), var(--surface) 60%); border-color: rgba(245, 197, 66, 0.45); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 46rem; }
.faq details { background: var(--surface); border: 1px solid var(--surface-2); border-radius: 18px; }
.faq details[open] { border-color: var(--surface-3); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; border-radius: 18px;
  font-weight: 700; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }
.faq details p + p { margin-top: -8px; }

/* CTA final */
.cta { text-align: center; padding: 64px 0 80px; }
.cta h2 { font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: 14px; }
.cta p { color: var(--muted); margin-bottom: 28px; }
.cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(245, 237, 228, 0.07); padding: 36px 0 44px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: grid; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 6px; }
.site-footer a:hover { color: var(--gold); }
.site-footer p { margin: 0; }

/* ---------- Pages texte (confidentialité, CGU, presse, 404) ---------- */
.prose { max-width: 44rem; padding: 48px 0 80px; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 10px; }
.prose .updated { color: var(--muted); margin-bottom: 32px; }
.prose h2 { font-size: 1.4rem; color: var(--gold); margin: 40px 0 12px; }
.prose h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.prose p, .prose li { color: rgba(245, 237, 228, 0.92); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 0 0 1em; padding: 18px 22px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 18px 18px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; color: var(--ink); background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.prose .wide { max-width: none; }

.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 1fr; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--surface-2); }
@media (min-width: 560px) { .facts div { grid-template-columns: 170px 1fr; } }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.swatch { overflow: hidden; border-radius: 16px; border: 1px solid var(--surface-2); background: var(--surface); }
.swatch i { display: block; height: 64px; }
.swatch span { display: block; padding: 10px 12px; font-size: 0.85rem; line-height: 1.3; }
.swatch code { display: block; margin-top: 2px; color: var(--muted); background: none; padding: 0; }

.dl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.dl { display: grid; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--surface-2); border-radius: 20px; }
.dl img { width: 100%; border-radius: 12px; background: var(--bg-deep); }
.dl .name { font-weight: 700; }
.dl .meta { color: var(--muted); font-size: 0.85rem; }
.dl a { font-weight: 700; }

.err { text-align: center; padding: 96px 0 120px; }
.err .big { font-size: clamp(5rem, 20vw, 9rem); font-weight: 900; line-height: 1; color: var(--gold); letter-spacing: -0.04em; }
.err h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 12px 0 10px; }
.err p { color: var(--muted); margin-bottom: 28px; }
.err .ph-card { max-width: 26rem; margin: 0 auto 32px; text-align: center; }
