/* Cophi : charte sobre et haut de gamme. Noir, blanc cassé, une touche de bronze. */
:root {
  --ink: #111;
  --ink2: #2b2b2b;
  --paper: #f5f2ed;
  --white: #fff;
  --line: rgba(17, 17, 17, 0.12);
  --muted: #6e6862;
  --dim: #9a938c;
  --bronze: #a87d4f;
  --bronze2: #c9a46e;
  --dark: #0d0d0d;
  --dark2: #1a1a1a;
  --dline: rgba(255, 255, 255, 0.14);
  --dmuted: #a7a19a;
  --no: #8c3b2e;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  /* Couleurs reprises par les écrans de l'admin. */
  --bg: #0d0d0d; --bg2: #161616; --card: #1f1f1f; --card2: #2a2a2a; --cream: #f5f2ed; --gold: #a87d4f; --gold2: #c9a46e;
  --serif: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 400;
  -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
img { -webkit-user-drag: none; user-select: none; }
.screen { position: fixed; inset: 0; display: none; flex-direction: column; background: var(--paper); }
.screen.on { display: flex; animation: fadeIn 0.5s ease both; }
.dark { background: var(--dark); color: var(--white); }
.scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: clip; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wrap { position: relative; width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }

/* Typographie */
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--bronze); }
.dark .eyebrow { color: var(--bronze2); }
.title { font-weight: 300; font-size: clamp(30px, 7.5vw, 42px); line-height: 1.12; margin: 12px 0 10px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 32px; font-size: 16px; line-height: 1.5; }

/* En-tête */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 20px;
  padding-top: env(safe-area-inset-top); flex: none; position: relative; z-index: 2; }
.wordmark { display: inline-flex; align-items: center; }
.logo { width: 66px; height: 28px; display: block; }
.logo.big { width: 150px; height: 64px; margin-bottom: 6px; }
@media (min-width: 900px) { .logo.big { width: 188px; height: 80px; } }
.by, .step { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.dark .by { color: var(--dmuted); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 34px;
  border-radius: 4px; background: var(--ink); color: var(--white); font-weight: 500; font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; transition: background 0.2s, transform 0.12s; text-decoration: none; }
.btn:hover { background: #333; }
.btn:active { transform: scale(0.98); }
.btn.light { background: var(--white); color: var(--ink); }
.btn.light:hover { background: #e9e4dc; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.ghost:hover { background: rgba(0, 0, 0, 0.04); }
.btn.small { height: 42px; padding: 0 20px; font-size: 12px; }
.link { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; text-decoration: underline; text-underline-offset: 4px; }
.link.light { color: var(--dmuted); }

/* Accueil */
#home { overflow: hidden; }
#home::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 50% at 50% 78%, rgba(201, 164, 110, 0.16), transparent 70%); }
.home-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px; gap: 18px; min-height: 0; }
.home-main > * { animation: rise 0.8s ease both; flex: none; }
.home-main > *:nth-child(2) { animation-delay: 0.08s; }
.home-main > *:nth-child(3) { animation-delay: 0.16s; }
.home-main > *:nth-child(4) { animation-delay: 0.24s; }
.home-main h1 { font-weight: 300; font-size: clamp(40px, 10.5vw, 76px); line-height: 1.04; margin: 0; letter-spacing: -0.02em; }
.home-main .lead { color: var(--dmuted); font-size: 17px; line-height: 1.55; max-width: 34ch; margin: 0 0 8px; font-weight: 300; }
.shelf { position: relative; z-index: 1; height: 150px; flex: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.shelf-track { display: flex; gap: 34px; width: max-content; animation: slide 60s linear infinite; padding: 10px 0; }
.shelf-track img { height: 96px; width: auto; object-fit: contain; -webkit-box-reflect: below 2px linear-gradient(transparent 62%, rgba(255, 255, 255, 0.18)); }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.home-foot { position: relative; z-index: 1; display: flex; justify-content: center; border-top: 1px solid var(--dline);
  padding: 18px 12px max(18px, env(safe-area-inset-bottom)); flex: none; }
.home-foot div { flex: 1; max-width: 140px; text-align: center; border-left: 1px solid var(--dline); }
.home-foot div:first-child { border-left: 0; }
.home-foot b { display: block; font-weight: 300; font-size: 26px; }
.home-foot span { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dmuted); }

/* Machine */
#machine .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 40px; }
.machines { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.machine { background: var(--white); border-radius: 6px; padding: 26px 12px 22px; display: flex; flex-direction: column; align-items: center;
  gap: 6px; box-shadow: 0 1px 0 var(--line); outline: 1px solid transparent; transition: outline-color 0.2s, transform 0.15s, box-shadow 0.2s; }
.machine:hover { outline-color: var(--ink); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08); }
.machine:active { transform: scale(0.98); }
.m-img { height: 110px; width: 100%; display: grid; place-items: center; margin-bottom: 8px; }
.m-img img { max-height: 104px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.18)); }
.machine b { font-weight: 500; font-size: 18px; letter-spacing: 0.02em; }
.machine span { font-size: 13px; color: var(--muted); }

/* Quiz */
#quiz { padding-bottom: env(safe-area-inset-bottom); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.icon-btn:disabled { opacity: 0.25; }
.bar { height: 2px; background: var(--line); flex: none; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.35s ease; }
.quiz-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.live { display: flex; align-items: center; gap: 14px; height: 84px; flex: none; margin-top: 6px; }
.live svg { width: 76px; height: 76px; flex: none; }
.live-text small { display: block; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; }
.live-text b { font-weight: 400; font-size: 20px; line-height: 1.2; display: block; min-height: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 11px; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 2px; background: rgba(0, 0, 0, 0.05); color: var(--muted); }
.chip.hot { background: var(--ink); color: var(--white); animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.deck { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; margin: 4px 0 6px; }
.card { position: absolute; width: min(84vw, 340px); height: min(100%, 460px); border-radius: 8px; background: var(--white); overflow: hidden;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.12), 0 1px 0 var(--line);
  display: flex; flex-direction: column; touch-action: none; user-select: none; will-change: transform;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), opacity 0.35s; }
.card.back1 { transform: translateY(12px) scale(0.95); opacity: 0.8; }
.card.back2 { transform: translateY(24px) scale(0.9); opacity: 0.4; }
.card.dragging { transition: none; }
.card .photo { flex: 1; min-height: 0; background: #fff; position: relative; pointer-events: none; padding: 26px 26px 0; }
.card .photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .cap { flex: none; padding: 16px 20px 22px; text-align: center; border-top: 1px solid rgba(0, 0, 0, 0.06); margin: 0 26px; }
.card .cap small { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); }
.card h2 { font-weight: 400; font-size: clamp(24px, 6.5vw, 30px); margin: 6px 0 0; line-height: 1.1; letter-spacing: -0.005em; }
.stamp { position: absolute; top: 22px; padding: 7px 14px; font-weight: 500; font-size: 12px; letter-spacing: 0.2em; z-index: 2;
  text-transform: uppercase; opacity: 0; pointer-events: none; background: var(--white); color: var(--ink); border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.stamp.yes { left: 18px; background: var(--ink); color: var(--white); }
.stamp.no { right: 18px; }
.stamp.meh { top: auto; bottom: 110px; left: 50%; transform: translateX(-50%); }
.actions { display: flex; justify-content: center; align-items: center; gap: 30px; height: 84px; margin-bottom: 24px; flex: none; }
.act { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, 0.06); transition: transform 0.12s, background 0.2s; position: relative; color: var(--ink); }
.act:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.act:active { transform: scale(0.92); }
.act svg { width: 26px; height: 26px; }
.act.main { width: 68px; height: 68px; background: var(--ink); color: var(--white); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2); }
.act.small { width: 46px; height: 46px; }
.act.small svg { width: 20px; height: 20px; }
.act span { position: absolute; top: 100%; margin-top: 7px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); white-space: nowrap; }
.finish { position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 6px; z-index: 5; height: 44px;
  padding: 0 22px; font-size: 12px; animation: rise 0.4s ease both; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.hint { text-align: center; color: var(--dim); font-size: 12px; height: 18px; flex: none; }

/* Analyse */
#analyse { align-items: center; justify-content: center; text-align: center; gap: 22px; }
#analyse svg { width: min(76vw, 320px); height: min(76vw, 320px); }
.analyse-lines { color: var(--dmuted); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; height: 20px;
  animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Résultats */
.res-top { padding-bottom: 34px; }
.res-top .topbar { max-width: 1100px; margin: 0 auto; }
.profile { text-align: center; }
.profile h1 { font-weight: 300; font-size: clamp(38px, 10vw, 58px); margin: 12px 0 10px; line-height: 1.05; letter-spacing: -0.015em; }
.profile p { color: var(--dmuted); margin: 0 auto; max-width: 38ch; font-size: 15px; line-height: 1.6; font-weight: 300; }
.big-radar { display: block; width: min(100%, 380px); margin: 8px auto 0; aspect-ratio: 1; }
.legend { display: flex; justify-content: center; gap: 18px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dmuted); }
.legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 8px; }
.legend .l-you { background: var(--bronze2); }
.legend .l-cof { background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 7px); }
.res { padding-bottom: 60px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin: 26px 0 30px; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg button { height: 36px; padding: 0 14px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--white); }
.toggles { display: flex; gap: 14px; }
.tog { font-size: 12px; letter-spacing: 0.06em; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; height: 36px; }
.tog::before { content: ''; width: 14px; height: 14px; border: 1px solid var(--ink); border-radius: 2px; }
.tog.on { color: var(--ink); }
.tog.on::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.hero { position: relative; background: var(--white); border-radius: 8px; padding: 26px 22px 22px; margin-top: 12px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.07), 0 1px 0 var(--line); animation: rise 0.5s ease both; }
.hero-top { display: grid; grid-template-columns: 128px 1fr; gap: 20px; align-items: center; }
.capsule-img { width: 128px; height: 140px; display: grid; place-items: center; border-radius: 6px;
  background: radial-gradient(60% 50% at 50% 60%, #efe9e0, transparent 75%); }
.capsule-img img { max-width: 96%; max-height: 96%; object-fit: contain; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.22)); }
.rank { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bronze); }
.hero h2 { font-weight: 400; font-size: 30px; margin: 6px 0 4px; line-height: 1.05; letter-spacing: -0.01em; }
.meta { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.intensity { white-space: nowrap; flex-wrap: wrap; display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.intensity .bars { display: flex; gap: 2px; }
.intensity .bars i { width: 5px; height: 12px; background: #e3ddd4; }
.intensity .bars i.f { background: var(--ink); }
.match { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.match b { font-weight: 300; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.match small { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.headline { font-weight: 300; font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ink2); margin: 22px 0 16px;
  padding-left: 14px; border-left: 2px solid var(--bronze2); }
.reasons { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.reasons li { display: flex; align-items: center; gap: 14px; font-size: 15px; line-height: 1.4; }
.reasons img { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: contain; background: #fff; padding: 5px; box-shadow: inset 0 0 0 1px var(--line); }
.reasons li.avoid img { filter: grayscale(1); opacity: 0.7; }
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.notes span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink2); }
.hero .btn { width: 100%; }
.fallback { width: 60px; height: 50px; clip-path: polygon(22% 0, 78% 0, 100% 86%, 100% 100%, 0 100%, 0 86%); background: var(--bronze2); }
.others-title { font-weight: 400; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; margin: 40px 0 14px; }
.others { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 16px; margin: 0 -20px; scroll-padding: 0 20px;
  scrollbar-width: none; }
.others::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 170px; scroll-snap-align: start; background: var(--white); border-radius: 6px; padding: 18px 14px 16px;
  text-align: left; box-shadow: 0 1px 0 var(--line); outline: 1px solid transparent; transition: outline-color 0.2s; }
.mini:hover { outline-color: var(--line); }
.mini.sel { outline: 1px solid var(--ink); }
.mini .cimg { height: 86px; display: grid; place-items: center; margin-bottom: 12px; }
.mini .cimg img { max-height: 86px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.18)); }
.mini b { font-weight: 500; font-size: 16px; display: block; line-height: 1.15; }
.mini .pct { color: var(--bronze); font-size: 12px; letter-spacing: 0.06em; margin-top: 4px; display: block; }
.mini small { color: var(--muted); font-size: 12px; display: block; margin-top: 8px; line-height: 1.4; }
.share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; }
.share-row .btn { padding: 0 12px; font-size: 12px; letter-spacing: 0.1em; }
.method { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.method p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 10px 0 0; font-weight: 300; }
.disclaimer { color: var(--dim); font-size: 11px; margin-top: 28px; line-height: 1.6; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--white);
  padding: 12px 20px; border-radius: 4px; font-size: 13px; letter-spacing: 0.04em; z-index: 50; animation: fadeIn 0.3s ease both; }
.radar-label { font-family: var(--sans); font-size: 10px; letter-spacing: 0.04em; fill: #8d877f; }
.radar-label.top { fill: #fff; font-weight: 500; }
@media (min-width: 900px) {
  .shelf { height: 190px; }
  .shelf-track img { height: 130px; }
  .shelf-track { gap: 50px; }
  .card { width: 360px; }
}
@media (max-height: 780px) {
  .home-main { gap: 12px; }
  .home-main h1 { font-size: clamp(36px, 9vw, 58px); }
  .logo.big { width: 132px; height: 56px; }
  .shelf { height: 140px; }
  .shelf-track img { height: 96px; }
}
@media (max-height: 700px) {
  .shelf { height: 112px; }
  .shelf-track img { height: 72px; }
  .live { height: 64px; }
  .live svg { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
