/* PÉPITE — styles du site (bêta 0.2) */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations"),
       url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --color-cream: #fff6e9;
  --color-peach: #f7c5a8;
  --color-yellow: #f6d77a;
  --color-sage: #a9bfa1;
  --color-text: #3b3530;
  --ink-soft: #6a6058;
  --sage-deep: #4e6a4b;
  --paper: #fffdf8;
  --line: #ecdcc6;
  --gold-1: #f8dd86;
  --gold-2: #e6b84e;
  --focus: 0 0 0 3px var(--color-cream), 0 0 0 5px var(--sage-deep);
  --font: "Bricolage", ui-rounded, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-cream: #221e1a;
    --color-text: #f4ece0;
    --ink-soft: #cbbfb0;
    --sage-deep: #b9d2b3;
    --paper: #2c2722;
    --line: #463e35;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "opsz" 14;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sage-deep); text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -100px; background: var(--paper); padding: .5rem 1rem; border-radius: 999px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 40rem; margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête ---------- */
.masthead { padding: 3rem 0 2rem; }
.wordmark {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0; color: inherit; text-decoration: none;
  font-size: clamp(2.6rem, 11vw, 4rem);
  font-weight: 760; font-stretch: 88%;
  letter-spacing: -.02em; line-height: 1;
}
.wordmark svg { width: .8em; height: .8em; flex: none; }
.masthead--small { padding: 1.5rem 0 1rem; }
.masthead--small .wordmark { font-size: 1.6rem; }
.tagline { margin: .9rem 0 0; max-width: 24ch; font-size: 1.25rem; line-height: 1.4; color: var(--ink-soft); }

/* Le scintillement, une seule fois au chargement */
.glint { transform-origin: 70% 30%; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .glint { animation: glint 1.6s .4s ease-out 1 both; }
}
@keyframes glint {
  0% { opacity: 0; transform: scale(.2) rotate(0); }
  40% { opacity: 1; transform: scale(1.1) rotate(20deg); }
  100% { opacity: 0; transform: scale(.6) rotate(45deg); }
}

/* ---------- Accueil : les galets ---------- */
.choices-title { margin: 0 0 1rem; font-size: 1.05rem; font-weight: 500; color: var(--ink-soft); }
.pebbles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 0; padding: 0; list-style: none; }
.pebble {
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; min-height: 9.5rem; padding: 1.25rem 1.1rem;
  border: 0; color: #3b3530; text-align: left;
  font: inherit; cursor: pointer;
  transition: transform .25s ease, border-radius .4s ease;
}
.pebble__name { font-size: 1.2rem; font-weight: 680; line-height: 1.2; font-stretch: 92%; }
.pebble__hint { margin-top: .35rem; font-size: .9rem; line-height: 1.35; color: #433a33; }
.pebble--sourire  { background: var(--color-peach);  border-radius: 58% 42% 50% 50% / 52% 46% 54% 48%; }
.pebble--question { background: var(--color-yellow); border-radius: 44% 56% 46% 54% / 58% 44% 56% 42%; }
.pebble--doux     { background: var(--color-sage);   border-radius: 52% 48% 60% 40% / 44% 56% 44% 56%; }
.pebble--surprise {
  background: transparent; color: var(--color-text);
  border: 2px dashed var(--gold-2);
  border-radius: 46% 54% 42% 58% / 54% 48% 52% 46%;
}
.pebble--surprise .pebble__hint { color: var(--ink-soft); }
.pebble:hover { transform: translateY(-2px) rotate(-1deg); }
.pebble:focus-visible { border-radius: 28px; }

/* ---------- Une expérience ---------- */
.experience {
  background: var(--paper);
  border-radius: 28px 28px 36px 24px;
  padding: 1.75rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
}
@media (min-width: 560px) { .experience { padding: 2.25rem 2.25rem 1.75rem; } }
.experience__kind { margin: 0 0 .6rem; font-size: .95rem; font-weight: 600; }
.kind--sourire { color: #a5583a; }
.kind--question { color: #8a6412; }
.kind--doux { color: #4e6a4b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kind--sourire { color: #f2b597; }
  :root:not([data-theme="light"]) .kind--question { color: #f3d27a; }
  :root:not([data-theme="light"]) .kind--doux { color: #b9d2b3; }
}
.experience__title {
  margin: 0 0 1rem; font-size: clamp(1.6rem, 6vw, 2.1rem);
  line-height: 1.15; font-weight: 720; font-stretch: 90%; letter-spacing: -.01em;
}
.experience__title:focus { outline: none; box-shadow: none; }
.experience p { margin: 0 0 .9rem; max-width: 62ch; }
.illus { width: 100%; max-width: 20rem; height: auto; margin: .25rem 0 1.25rem; }

.reveal-btn {
  min-height: 48px; padding: .7rem 1.4rem;
  border: 0; border-radius: 999px;
  background: var(--color-yellow); color: #3b3530;
  font: inherit; font-weight: 650; cursor: pointer;
}
.answer { margin-top: .25rem; }
.answer__lead { font-size: 1.25rem; font-weight: 650; line-height: 1.35; margin: 0 0 1rem !important; }
@media (prefers-reduced-motion: no-preference) {
  .answer:not([hidden]) { animation: rise .45s ease-out; }
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sources { margin: 1.25rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.sources ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.draft-badge { display: inline-block; margin-bottom: .75rem; padding: .15rem .6rem; border-radius: 999px; background: #ffe2a6; color: #5b3d00; font-size: .85rem; font-weight: 600; }

/* ---------- Actions ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .65rem 1.2rem;
  border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--color-text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn--main { background: var(--color-text); border-color: var(--color-text); color: var(--color-cream); }
.btn:hover { border-color: var(--color-peach); }
.btn--main:hover { opacity: .9; }
.share-status { min-height: 1.5em; margin: .6rem 0 0; font-size: .95rem; color: var(--sage-deep); }
.share-fallback { width: 100%; margin-top: .5rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--color-text); font: inherit; font-size: .95rem; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 3.5rem; padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; }
.site-footer nav a { color: var(--ink-soft); display: inline-block; padding: .6rem .1rem; }
.site-footer .beta { text-align: center; margin: .5rem 0 0; font-size: .85rem; }

/* ---------- Pages de texte ---------- */
.prose h1 { font-size: 2rem; line-height: 1.15; font-weight: 720; font-stretch: 90%; margin: 0 0 1rem; }
.prose h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
.prose p, .prose li { max-width: 62ch; }
.todo { background: #ffe9b3; color: #4a3500; padding: 0 .3rem; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .pebble { transition: none; }
  .pebble:hover { transform: none; }
}
