/* On offre quoi ? — imprimé rétro : aplats francs, filets fins, typo de journal, détails faits main.
   Pas de dégradés, pas de flou, pas d'ombres portées. */
:root {
  --paper: #f3ead8;
  --paper-2: #e8dcc3;
  --card: #fbf6ea;
  --ink: #2a1a14;
  --muted: #7a6455;
  --tomato: #d93d24;
  --mustard: #edb022;
  --on-tomato: #fff6e8;
  --grain-opacity: .2;
  --display: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1e1410; --paper-2: #2b1e18; --card: #261a15; --ink: #f3ead8; --muted: #b7a291;
    --tomato: #f05a3f; --mustard: #f2bb3a; --on-tomato: #1e1410; --grain-opacity: .1;
  }
}
:root[data-theme="dark"] {
  --paper: #1e1410; --paper-2: #2b1e18; --card: #261a15; --ink: #f3ead8; --muted: #b7a291;
  --tomato: #f05a3f; --mustard: #f2bb3a; --on-tomato: #1e1410; --grain-opacity: .1;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.45; color: var(--ink); background: var(--paper);
  min-height: 100vh; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--mustard); color: #2a1a14; }

/* Grain de papier */
.grain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; opacity: var(--grain-opacity); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grain { mix-blend-mode: screen; } }
:root[data-theme="dark"] .grain { mix-blend-mode: screen; }

.app { position: relative; max-width: 780px; margin: 0 auto; padding: 22px 22px 72px; }

/* Souligné tracé à la main */
.squiggle { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .26em; overflow: visible; pointer-events: none; }
.squiggle path { fill: none; stroke: var(--tomato); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---------- En-tête ---------- */
.top { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; margin-bottom: 34px; border-bottom: 3px double var(--ink); }
.brand { background: none; border: 0; padding: 0; font-family: var(--display); font-size: 1.55rem; letter-spacing: -.01em; }
.brand em { position: relative; font-style: normal; white-space: nowrap; }
.counter { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }

/* ---------- Mascotte : collée comme un timbre dentelé ---------- */
.mascot {
  position: absolute; top: 84px; right: 22px; width: 112px; height: 112px; padding: 9px;
  background: #fffaf0; transform: rotate(6deg);
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 10px) calc(100% - 10px) no-repeat,
                radial-gradient(circle 4.2px at 50% 50%, #0000 96%, #000) -7px -7px / 14px 14px;
          mask: linear-gradient(#000 0 0) center / calc(100% - 10px) calc(100% - 10px) no-repeat,
                radial-gradient(circle 4.2px at 50% 50%, #0000 96%, #000) -7px -7px / 14px 14px;
}
.mascot svg { display: block; width: 100%; height: auto; overflow: hidden; }
.mascot .spiral { opacity: 0; }
.mascot.think .shades { transform: translateY(3px); }   /* lunettes baissées quand elle réfléchit */
.mascot.think .spiral { opacity: 1; }
body[data-screen="guess"] .mascot, body[data-screen="end"] .mascot { display: none; }

/* ---------- Typo ---------- */
.screen { animation: appear .25s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }
h1, h2, h3 { font-weight: 400; margin: 0; }
.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; min-height: 1.3em;
  font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .13em; line-height: 1.45; text-transform: uppercase; color: var(--tomato);
}
.kicker::before { content: ""; width: 26px; height: 2px; background: currentColor; flex: none; }
.kicker:empty { visibility: hidden; }
h1 { font-family: var(--display); font-size: clamp(2.5rem, 8.4vw, 4.5rem); line-height: 1.02; letter-spacing: -.025em; margin-bottom: 34px; padding-right: 130px; }
.mis { position: relative; white-space: nowrap; }
.mis .squiggle path { stroke: var(--mustard); stroke-width: 6; }

/* Accueil : mode d'emploi en trois temps */
.steps { list-style: none; margin: 0 0 34px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1.5px solid var(--ink); }
.steps li { padding: 14px 16px 0 0; font-size: .98rem; color: var(--muted); }
.steps li + li { padding-left: 16px; border-left: 1px solid var(--ink); }
.steps b { display: block; font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--tomato); margin-bottom: 6px; }
.go { display: flex; align-items: center; gap: 6px; }
.arrow { width: 84px; height: 42px; flex: none; transform: scaleX(-1) rotate(-8deg); }
.arrow path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hand { font-style: italic; color: var(--muted); transform: rotate(-4deg); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 34em; margin: 0 0 30px; }

/* ---------- Boutons : aplats, sans ombre ---------- */
.btn {
  border: 1.5px solid var(--ink); background: transparent; border-radius: 2px;
  padding: 11px 18px; font-weight: 700; font-size: .98rem; transition: background .12s, color .12s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:focus-visible, .link:focus-visible, .other button:focus-visible, .answers button:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.btn.primary { background: var(--tomato); border-color: var(--tomato); color: var(--on-tomato); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.big { padding: 17px 30px; font-size: 1.15rem; }
.btn.bad { border-color: var(--tomato); color: var(--tomato); }
.btn.bad:hover { background: var(--tomato); color: var(--on-tomato); }
.btn.ghost { border-color: transparent; padding-left: 4px; padding-right: 4px; text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.btn.ghost:hover { background: none; color: var(--tomato); }
.btn:disabled { opacity: .5; cursor: wait; }

/* ---------- Question ---------- */
.q-head { display: grid; grid-template-columns: auto 1fr; gap: 0 22px; align-items: start; margin-bottom: 30px; padding-right: 130px; }
.qnum {
  font-family: var(--display); font-size: clamp(3.6rem, 11vw, 6.4rem); line-height: .82; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--tomato); padding-top: 4px;
}
.question { font-family: var(--display); font-size: clamp(1.8rem, 5.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.02em; min-height: 2.2em; text-wrap: balance; }

/* Réponses : un coupon à cases prédécoupées */
.answers { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); border: 1.5px solid var(--ink); background: var(--card); }
.answers::before, .answers::after {   /* encoches du coupon */
  content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink);
}
.answers::before { left: -10px; clip-path: inset(0 0 0 50%); }
.answers::after { right: -10px; clip-path: inset(0 50% 0 0); }
.answers .btn {
  border: 0; border-radius: 0; background: none; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  gap: 20px; min-height: 96px; padding: 12px 14px 14px; text-align: left; line-height: 1.15; font-weight: 500;
}
.answers .btn + .btn { border-left: 1.5px dashed var(--ink); }
.answers .btn kbd { font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.answers .btn[data-v="1"], .answers .btn[data-v="-1"] { font-family: var(--display); font-size: 1.5rem; }
.answers .btn[data-v="1"] { background: var(--tomato); color: var(--on-tomato); }
.answers .btn[data-v="1"] kbd { color: var(--on-tomato); opacity: .75; }
.answers .btn[data-v="-1"] { background: var(--ink); color: var(--paper); }
.answers .btn[data-v="-1"] kbd { color: var(--paper); opacity: .6; }
.answers .btn[data-v="0"] { color: var(--muted); font-style: italic; }
.answers .btn:hover { background: var(--mustard); color: #2a1a14; }
.answers .btn:hover kbd { color: #2a1a14; opacity: .7; }

/* Jauge : une règle graduée et son curseur */
.heat { margin-top: 40px; }
.heat-bar {
  position: relative; height: 16px; border-bottom: 1.5px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px calc(100% / 30));
  background-size: 100% 7px; background-repeat: no-repeat; background-position: bottom;
}
.heat-bar span { position: absolute; left: 0; bottom: -1.5px; width: 0; height: 5px; background: var(--tomato); transition: width .5s ease; }
.heat-bar span::after {
  content: ""; position: absolute; right: -7px; bottom: 6px; border: 7px solid transparent; border-top: 10px solid var(--tomato); border-bottom: 0;
}
.heat-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.sub-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.link { background: none; border: 0; padding: 2px 0; font-size: .92rem; color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { color: var(--tomato); }
.link:disabled { visibility: hidden; }

/* ---------- Proposition : une fiche de catalogue ---------- */
.tag-card { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-left: 14px solid var(--tomato); padding: 28px 30px 24px; margin: 4px 0 24px; }
.tag-card .theme { margin: 0 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--tomato); }
.tag-card h2 { font-family: var(--display); font-size: clamp(2.1rem, 7vw, 3.5rem); line-height: 1; letter-spacing: -.025em; margin-bottom: 14px; padding-right: 120px; text-wrap: balance; }
.tag-card .desc { margin: 0 0 14px; font-size: 1.1rem; max-width: 32em; }
/* Budget : un coup de tampon */
.tag-card .price {
  position: absolute; top: 20px; right: 22px; width: 96px; height: 96px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 2px solid var(--tomato); outline: 1px solid var(--tomato); outline-offset: 3px; color: var(--tomato);
  font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2;
  transform: rotate(-11deg); opacity: .88;
}
.tag-card .price b { display: block; font-family: var(--sans); font-size: 1.3rem; letter-spacing: .02em; margin: 1px 0; }
.examples { list-style: none; margin: 0 0 18px; padding: 0; font-style: italic; color: var(--muted); }
.examples::before { content: "Par exemple : "; font-style: normal; font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.examples li { display: inline; }
.examples li + li::before { content: " · "; font-style: normal; }
.tip { margin: 0 0 14px; font-size: .92rem; }
.tip strong, .idea .tip strong { color: var(--tomato); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; margin-right: 6px; }
.idea .tip { margin-top: 6px; color: var(--ink); }
.why { margin: 0; padding-top: 12px; border-top: 1px solid var(--ink); font-size: .9rem; color: var(--muted); }
.why strong { color: var(--ink); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; margin-right: 6px; }

/* Fiches à faire défiler : glisser à droite = oui, à gauche = non */
.deck { position: relative; margin: 4px 0 22px; }
.deck::before, .deck::after {   /* les fiches suivantes, en pile dessous */
  content: ""; position: absolute; inset: 0; background: var(--card); border: 1.5px solid var(--ink);
}
.deck::before { transform: rotate(-1.6deg) translateY(5px); }
.deck::after { transform: rotate(1.1deg) translateY(3px); }
.card { position: relative; z-index: 1; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.card:active { cursor: grabbing; }
.card.deal { animation: deal .22s ease-out; }
@keyframes deal { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.card .tag-card { margin: 0; min-height: 300px; }
.stamp {   /* coup de tampon pendant le glissé */
  position: absolute; top: 34%; padding: 4px 16px 6px; border: 4px solid currentColor; border-radius: 6px;
  font-family: var(--display); font-size: 3rem; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
  opacity: 0; pointer-events: none; background: color-mix(in srgb, var(--card) 80%, transparent);
}
.stamp.yes { left: 8%; color: #1f8a5b; transform: rotate(-14deg); }
.stamp.no { right: 8%; color: var(--tomato); transform: rotate(12deg); }
.swipe-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swipe {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 18px; border-radius: 2px;
  font-family: var(--display); font-size: 1.7rem; line-height: 1; border: 1.5px solid var(--ink); background: transparent; transition: background .12s, color .12s;
}
.swipe kbd { font-family: var(--sans); font-size: .9rem; opacity: .6; }
.swipe.no:hover { background: var(--ink); color: var(--paper); }
.swipe.yes { background: var(--tomato); border-color: var(--tomato); color: var(--on-tomato); }
.swipe.yes:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.swipe:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.swipe-more { display: flex; justify-content: center; gap: 28px; margin-top: 14px; }
.swipe-more .link { font-size: 1rem; color: var(--ink); }
.swipe-more .link.bad { color: var(--tomato); }
.sub-links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: flex-end; }
#screen-guess .sub-actions { align-items: center; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--ink); }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
#end-list { margin-top: 6px; counter-reset: idx 0; }
#end-list li { counter-increment: idx; display: grid; grid-template-columns: 46px 1fr; gap: 2px 14px; align-items: baseline; border-bottom: 1px solid var(--ink); padding: 14px 0; }
#end-list li::before { content: counter(idx, decimal-leading-zero); font-family: var(--display); font-size: 1.45rem; color: var(--tomato); grid-row: span 2; }
#end-list .name { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; }
#end-list .ex { font-size: .9rem; color: var(--muted); font-style: italic; }
.guess-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.owned-list { margin: 16px 0 0; font-size: .88rem; color: var(--muted); }
.owned-list span { display: block; margin-top: 3px; }
.owned-list strong { color: var(--ink); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; margin-right: 6px; }
.owned-list s { text-decoration-color: var(--tomato); text-decoration-thickness: 2px; }

/* ---------- Autres pistes : un index numéroté ---------- */
.others-title { display: flex; align-items: center; gap: 14px; margin: 48px 0 0; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.others-title::after { content: ""; flex: 1; border-top: 1.5px solid var(--ink); }
.others { list-style: none; margin: 0; padding: 0; counter-reset: idx 1; }
.other { counter-increment: idx; display: grid; grid-template-columns: 46px 1fr auto; align-items: baseline; gap: 4px 14px; border-bottom: 1px solid var(--ink); padding: 15px 0; }
.other::before { content: counter(idx, decimal-leading-zero); font-family: var(--display); font-size: 1.45rem; color: var(--tomato); }
.other .pick { background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.other .name { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; letter-spacing: -.01em; }
.other .pick:hover .name { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.other .ex { font-size: .86rem; color: var(--muted); font-style: italic; }
.other .tag { font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.other-actions { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.owned-btn { background: none; border: 0; padding: 1px 0; font-size: .8rem; color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
.owned-btn:hover { color: var(--ink); }
.owned-btn.bad { color: var(--tomato); }

/* ---------- Fin ---------- */
.end-title { font-family: var(--display); font-size: clamp(2.2rem, 7vw, 3.8rem); line-height: 1.02; letter-spacing: -.025em; margin-bottom: 18px; }
.end-title span { color: var(--tomato); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .app { padding: 16px 16px 56px; }
  .top { margin-bottom: 24px; }
  .mascot { top: 76px; right: 12px; width: 84px; height: 84px; padding: 7px; }
  h1 { padding-right: 84px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; padding: 10px 0; }
  .steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--ink); }
  .steps b { font-size: 1.6rem; margin: 0; }
  .q-head { grid-template-columns: 1fr; padding-right: 0; }
  .qnum { font-size: 3.4rem; margin-bottom: 8px; }
  .q-head .kicker { padding-right: 90px; }
  .answers { grid-template-columns: 1fr; }
  .answers::before, .answers::after { display: none; }
  .answers .btn { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; min-height: 0; padding: 14px 16px; }
  .answers .btn + .btn { border-left: 0; border-top: 1.5px dashed var(--ink); }
  .tag-card { padding: 22px 18px 20px; border-left-width: 10px; }
  .tag-card h2 { padding-right: 0; }
  .tag-card .price { position: static; float: right; width: 80px; height: 80px; margin: 0 0 10px 12px; }
  .other { grid-template-columns: 36px 1fr; }
  .other-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 6px; }
  .guess-actions .btn:not(.ghost) { flex: 1 1 auto; }
  .arrow, .hand { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


/* ---------- Accueil : contenu sous le quiz (masqué pendant la partie) ---------- */
.home-more { margin-top: 64px; padding-top: 26px; border-top: 3px double var(--ink); }
body[data-screen]:not([data-screen="intro"]) .home-more { display: none; }
.home-more h2, .outro h2, .related h2, .hub-group h2 { font-family: var(--display); font-size: 1.7rem; letter-spacing: -.02em; margin: 34px 0 10px; }
.home-more h2:first-child { margin-top: 0; }
.home-more p { color: var(--muted); max-width: 40em; }
.home-links, .related ul, .hub-group ul { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 22px; }
.home-links li, .related li, .hub-group li { border-bottom: 1px solid var(--ink); padding: 9px 0; }
.home-links a, .related a, .hub-group a, .crumbs a, .site-footer a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.home-links a:hover, .related a:hover, .hub-group a:hover, .crumbs a:hover, .site-footer a:hover { color: var(--tomato); }
.faq details { border-bottom: 1px solid var(--ink); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 2px; }

/* ---------- Pages de contenu (idées cadeaux par passion) ---------- */
a.brand, a.counter { color: inherit; text-decoration: none; }
a.counter:hover { color: var(--tomato); }
a.btn { display: inline-block; text-decoration: none; }
.content-page h1 { padding-right: 0; font-size: clamp(2.2rem, 7vw, 3.9rem); margin-bottom: 22px; }
.content-page .mis { white-space: normal; }
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 22px; }
.cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 36px; }
.ideas { list-style: none; margin: 0; padding: 0; counter-reset: idea; border-top: 1.5px solid var(--ink); }
.idea { counter-increment: idea; position: relative; padding: 20px 0 20px 62px; border-bottom: 1px solid var(--ink); }
.idea::before { content: counter(idea, decimal-leading-zero); position: absolute; left: 0; top: 18px; font-family: var(--display); font-size: 1.7rem; color: var(--tomato); }
.idea h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; letter-spacing: -.015em; margin-bottom: 6px; }
.idea p { margin: 0 0 4px; }
.idea .ex { font-style: italic; color: var(--muted); }
.idea .meta { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.outro { margin-top: 44px; }
.hub { margin-top: 10px; }
.hub-group li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hub-group li span { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.site-footer { margin-top: 64px; padding-top: 18px; border-top: 3px double var(--ink); font-size: .88rem; color: var(--muted); }
.site-footer p { margin: 0 0 6px; }
@media (max-width: 640px) { .idea { padding-left: 46px; } .idea::before { font-size: 1.4rem; } }
