/* ============================================
   TRYNSO — Standalone styles (no dependency on any other project)
   ============================================ */

:root {
  --charbon: #0F172A;
  --orange: #FF8A3D;
  --creme: #F8F7F4;
  --sauge: #94A89A;

  /* Channel triplets of the 4 colors above, for alpha-blended surfaces,
     borders and shadows — never a new color, just those 4 at reduced
     opacity so the whole site stays inside the approved palette. */
  --charbon-rgb: 15, 23, 42;
  --orange-rgb: 255, 138, 61;
  --creme-rgb: 248, 247, 244;
  --sauge-rgb: 148, 168, 154;

  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--charbon);
  color: var(--creme);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Purely decorative — fixed, blurred, low-opacity, never intercepts
   clicks or sits in the stacking order above readable content. */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow::before {
  content: "";
  position: absolute;
  bottom: -15vw;
  right: -10vw;
  width: 55vw;
  height: 55vw;
  max-width: 620px;
  max-height: 620px;
  min-width: 320px;
  min-height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--orange-rgb), 0.22) 0%, rgba(var(--orange-rgb), 0) 70%);
  filter: blur(50px);
}

.topbar {
  padding: 20px 28px;
  border-bottom: 1px solid rgba(var(--creme-rgb), 0.1);
}

.logo {
  display: block;
  height: 34px;
  width: auto;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
}

@media (min-width: 769px) {
  main {
    justify-content: flex-start;
    align-items: center;
    padding-top: 18vh;
  }
}

/* ---------- Funnel progress ---------- */
.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.progress .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(var(--creme-rgb), 0.16);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.progress .dot.done {
  background: var(--sauge);
}

.progress .dot.active {
  width: 20px;
  background: var(--orange);
}

.step {
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.step[hidden] { display: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h1 em {
  font-style: italic;
  color: var(--orange);
}

.sub {
  color: var(--sauge);
  font-size: 1rem;
  margin-bottom: 40px;
}

/* ---------- Shared primary button (consent / feedback CTAs) ---------- */
.btn-primary {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  border-radius: 999px;
  border: none;
  background: var(--orange);
  color: var(--charbon);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease), opacity 0.25s var(--ease);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Step 0: RGPD consent ---------- */
.consent-card {
  padding: 32px 28px;
  border-radius: 20px;
  border: 1px solid rgba(var(--creme-rgb), 0.14);
  background: rgba(var(--creme-rgb), 0.05);
  text-align: left;
}

.consent-card .eyebrow { display: inline-flex; }
.consent-card h1 { text-align: left; }

.consent-text {
  color: var(--sauge);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.consent-link {
  margin-bottom: 24px;
}

.consent-link a {
  color: var(--orange);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Step 1: feedback form ---------- */
.feedback-form {
  text-align: left;
}

.rating-picker {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.star {
  background: none;
  border: none;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--sauge);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.star:hover {
  transform: scale(1.1);
}

.star.active {
  color: var(--orange);
}

.feedback-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--sauge);
  margin-bottom: 8px;
}

.optional {
  color: var(--sauge);
  font-weight: 400;
  opacity: 0.75;
}

.feedback-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--creme-rgb), 0.14);
  background: rgba(var(--creme-rgb), 0.05);
  color: var(--creme);
  font-family: inherit;
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.feedback-form textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.feedback-form textarea::placeholder {
  color: var(--sauge);
}

/* ---------- Wheel ----------
   Segments alternate charbon / orange / sauge. Label text switches to
   charbon on the two lighter fills (orange, sauge) and stays creme on
   the dark charbon fill, so every label clears ~7:1 contrast against
   the wedge it sits on. */
.wheel-area {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--orange);
  z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(var(--charbon-rgb), 0.4));
}

.wheel-wrap {
  position: relative;
  width: min(340px, 84vw);
  height: min(340px, 84vw);
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  border: 6px solid var(--orange);
  box-shadow: 0 0 0 1px rgba(var(--creme-rgb), 0.12), 0 20px 50px rgba(var(--charbon-rgb), 0.5);
  background: conic-gradient(
    var(--orange) 0deg 60deg,
    var(--charbon) 60deg 120deg,
    var(--sauge) 120deg 180deg,
    var(--orange) 180deg 240deg,
    var(--charbon) 240deg 300deg,
    var(--sauge) 300deg 360deg
  );
  transform: rotate(0deg);
  transition: transform 4.5s cubic-bezier(0.17, 0.67, 0.14, 1);
  will-change: transform;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(var(--charbon-rgb), 0) 0deg 59.2deg, rgba(var(--charbon-rgb), 0.55) 59.2deg 60deg);
  pointer-events: none;
}

.label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

.label span {
  position: absolute;
  left: 16px;
  top: -11px;
  display: inline-block;
  width: 40%;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--creme);
  text-shadow: 0 1px 2px rgba(var(--charbon-rgb), 0.5);
}

.label.flip span {
  transform: rotate(180deg);
  left: auto;
  right: 16px;
  text-align: right;
}

.label.on-light span {
  color: var(--charbon);
  text-shadow: none;
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--charbon);
  border: 4px solid var(--orange);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-hub::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
}

/* ---------- Spin button ---------- */
.spin-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 999px;
  border: none;
  background: var(--orange);
  color: var(--charbon);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease), opacity 0.25s var(--ease);
}

.spin-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.spin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.spin-btn svg { transition: transform 0.3s var(--ease); }
.spin-btn:hover:not(:disabled) svg { transform: translateX(3px); }

/* ---------- Result card ---------- */
.result-card {
  margin: 32px auto 0;
  max-width: 360px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(var(--creme-rgb), 0.14);
  background: rgba(var(--creme-rgb), 0.05);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

.result-card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.result-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

.result-prize {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.result-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(var(--creme-rgb), 0.09);
  border: 1px dashed rgba(var(--orange-rgb), 0.4);
  margin-bottom: 14px;
}

.result-code-label {
  font-size: 0.78rem;
  color: var(--sauge);
}

.result-code-value {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--orange);
}

.result-note {
  font-size: 0.85rem;
  color: var(--sauge);
}

/* ---------- Step 3: unified Google review CTA ---------- */
.google-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px auto 0;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid rgba(var(--creme-rgb), 0.14);
  background: var(--creme);
  color: var(--charbon);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}

.google-cta:hover {
  filter: brightness(0.96);
  transform: translateY(-2px);
}

.funnel-footer-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--sauge);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 24px;
  font-size: 0.78rem;
  color: var(--sauge);
  border-top: 1px solid rgba(var(--creme-rgb), 0.1);
  position: relative;
}

.footer-logo {
  display: block;
  height: 15px;
  width: auto;
  opacity: 0.55;
}

.footer a {
  color: var(--sauge);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:hover {
  color: var(--creme);
}

.footer .dot {
  margin: 0 8px;
  color: rgba(var(--creme-rgb), 0.25);
}

/* ---------- Legal pages (règlement, confidentialité) ---------- */
.legal-page {
  max-width: 640px;
  text-align: left;
}

.legal-page h1 { text-align: left; margin-bottom: 28px; }

.legal-content h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p,
.legal-content li {
  color: var(--sauge);
  font-size: 0.92rem;
  line-height: 1.65;
}

.legal-content p { margin-bottom: 4px; }

.legal-content ul,
.legal-content ol {
  margin: 8px 0 16px 20px;
}

.legal-content a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-note {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--creme-rgb), 0.1);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--sauge);
  opacity: 0.85;
}

@media (max-width: 480px) {
  .label span { font-size: 0.62rem; width: 44%; }
  .logo { height: 28px; }
}
