/* =============================================================================
   Reset (aligné sur ton design system)
   ============================================================================= */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* =============================================================================
   Design tokens — repris à l'identique du système
   ============================================================================= */

:root {
  /* Typography */
  --font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-weight-base: 400;
  --font-weight-semibold: 600;
  --line-height-base: 24px;

  --font-size-xs: 14px;
  --font-size-sm: 15px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 19px;
  --font-size-2xl: 20px;
  --font-size-3xl: 22px;
  --font-size-4xl: 26px;

  /* Colors */
  --color-text-primary: #000000;
  --color-text-secondary: #52525b;
  --color-text-tertiary: #050505;

  --color-surface-muted: #ffffff;
  --color-surface-raised: #f5f5f5;
  --color-surface-strong: #f6f3f3;
  --color-surface-page: #f5f2f2;

  --color-border-default: #e5e7eb;
  --color-border-strong: #e4e4e7;
  --color-border-subtle: #f1f5f9;

  --color-text-muted: #64748b;

  --color-accent: #e0625a;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 10px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 17px;
  --space-7: 20px;
  --space-8: 24px;

  /* Radius */
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 50px;
  --radius-xl: 100px;
  --radius-2xl: 9999px;

  /* Shadows */
  --shadow-1: rgba(0, 0, 0, 0.1) 0px 4px 20px 0px;
  --shadow-2: rgba(0, 0, 0, 0.03) 0px -2px 16px -4px,
    rgba(0, 0, 0, 0.08) 0px 16px 40px -8px,
    rgba(0, 0, 0, 0.04) 0px 1px 3px 0px;
  --shadow-3: rgba(0, 0, 0, 0.06) 0px 4px 24px 0px,
    rgba(0, 0, 0, 0.04) 0px 1px 2px 0px;

  /* Motion */
  --duration-instant: 150ms;
  --duration-fast: 200ms;
  --duration-normal: 250ms;
  --duration-slow: 300ms;
  --duration-slower: 700ms;

  /* Layout */
  --container-max-width: 960px;
  --container-padding-inline: var(--space-5);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =============================================================================
   Base typography & body — halos accent aux 4 coins (cohérent avec notionclub)
   ============================================================================= */

html {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-surface-page);
}

body {
  font-weight: var(--font-weight-base);
  position: relative;
  min-height: 100vh;
  background-color: var(--color-surface-page);
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(224, 99, 90, 0.28) 0%, transparent 35%),
    radial-gradient(circle at 100% 0%, rgba(224, 99, 90, 0.24) 0%, transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(224, 99, 90, 0.22) 0%, transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(224, 99, 90, 0.26) 0%, transparent 35%),
    radial-gradient(ellipse at 0% 50%, rgba(224, 99, 90, 0.12) 0%, transparent 20%),
    radial-gradient(ellipse at 100% 50%, rgba(224, 99, 90, 0.12) 0%, transparent 20%);
  transition: opacity 0.45s ease;
}

main {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
}

p {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* =============================================================================
   Layout shell : screens empilés en absolute, transition opacity + slide
   ============================================================================= */

.app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  z-index: 1;
  overflow-x: hidden;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 100dvh;
  padding: var(--space-7) var(--container-padding-inline);
  display: flex;
  flex-direction: column;

  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.45s;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
  transition:
    opacity 0.45s ease 0.1s,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
    visibility 0s linear 0s;
}

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

/* =============================================================================
   Brand pill — fond noir, logo Notion Club à droite, lien vers notionclub.fr
   ============================================================================= */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px var(--space-3) 8px var(--space-5);
  background: var(--color-text-primary);
  color: var(--color-surface-muted);
  border-radius: var(--radius-2xl);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  align-self: flex-start;
  text-decoration: none;
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.brand__name {
  white-space: nowrap;
}

.brand__logo {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* .brand__dot reste utilisé dans l'eyebrow des résultats */
.brand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  animation: brand-blink 1.6s ease-in-out infinite;
}

@keyframes brand-blink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(224, 98, 90, 0.6);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 0 6px rgba(224, 98, 90, 0);
  }
}

/* =============================================================================
   Welcome
   ============================================================================= */

.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding-block: var(--space-5);
}

/* ── CTA section : cartes preview + bouton empilés en flex column.
   Le padding-top réserve exactement la hauteur des cartes, qui s'y
   positionnent en absolu depuis le sommet de la section. Le bouton
   s'affiche en dessous — cartes semblent émerger de son bord supérieur. ── */
.welcome__cta-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 180px;   /* hauteur réservée pour les cartes preview */
}

.welcome__preview {
  position: absolute;
  top: 0;               /* ancré en haut de la zone réservée */
  left: 50%;
  transform: translateX(-50%);
  width: min(88vw, 240px);
  height: 180px;
  pointer-events: none;
  z-index: 1;           /* derrière le bouton */
  overflow: visible;    /* l'ombre des cartes peut se dissiper librement */
}

/* Le bouton est au-dessus des cartes (z-index 2) et légèrement agrandi */
.welcome__cta-section .btn-cta {
  position: relative;
  z-index: 2;
  padding: 16px 36px;
  font-size: var(--font-size-lg);
}

@media (min-width: 768px) {
  .welcome__cta-section {
    padding-top: 200px;
  }
  .welcome__preview {
    height: 200px;
    width: min(60vw, 260px);
  }
}

.preview-card {
  position: absolute;
  bottom: 8px;          /* léger offset pour laisser de la place à la rotation */
  left: 50%;
  width: min(80vw, 210px);
  height: 160px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  /* Ombre allégée et plus localisée — la trainée extérieure n'est plus assez
     forte pour créer une rupture visible au niveau du bouton, mais elle reste
     présente pour donner du relief. */
  box-shadow:
    rgba(0, 0, 0, 0.05) 0px -2px 12px -4px,
    rgba(0, 0, 0, 0.14) 0px 14px 28px -8px,
    rgba(0, 0, 0, 0.08) 0px 3px 8px -1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  pointer-events: none;
  will-change: transform;
}

.preview-card__emoji {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.07));
}

/* Barres décoratives suggérant le texte */
.preview-card__lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.preview-card__line {
  height: 8px;
  width: 120px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-2xl);
}

.preview-card__line--short {
  width: 80px;
}

/* Positions d'empilement (data-stack piloté en JS) */
.preview-card[data-stack="0"] {
  transform: translateX(-50%) translateY(0px) rotate(1.5deg);
  z-index: 3;
  /* Wiggle continu : illustre le swipe à venir, comme le nudge sur la 1re carte du quiz */
  animation: preview-wiggle 4.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1.2s infinite;
}

.preview-card[data-stack="1"] {
  transform: translateX(-50%) translateY(14px) scale(0.94) rotate(-2.5deg);
  z-index: 2;
  opacity: 0.82;
}

.preview-card[data-stack="2"] {
  transform: translateX(-50%) translateY(26px) scale(0.88) rotate(3.5deg);
  z-index: 1;
  opacity: 0.55;
}

@keyframes preview-wiggle {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(1.5deg); }
  20%      { transform: translateX(-64%) translateY(-3px) rotate(-5deg); }
  40%      { transform: translateX(-50%) translateY(0) rotate(1.5deg); }
  60%      { transform: translateX(-36%) translateY(-3px) rotate(8deg); }
  80%      { transform: translateX(-50%) translateY(0) rotate(1.5deg); }
}

/* H1 deux niveaux : hook gros, corps plus petit + serré */
.welcome__title {
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
  text-align: center;
}

.welcome__title-hook {
  display: block;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1.12;
  color: var(--color-text-primary);
  margin-bottom: 0.25em;
  text-wrap: balance;
}

.welcome__title-body {
  display: block;
  font-size: clamp(18px, 4.6vw, 26px);
  line-height: 1.22;
  color: var(--color-text-secondary);
  text-wrap: balance;
  max-width: 24ch;
  margin-inline: auto;
}

/* Logo Tinder inline dans le texte — calé sur la cap-height */
.welcome__title-logo {
  display: inline-block;
  height: 1em;
  width: auto;
  margin: 0 0.15em -0.1em 0.15em;
  vertical-align: baseline;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.welcome__tagline {
  font-size: clamp(var(--font-size-lg), 4vw, var(--font-size-2xl));
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  letter-spacing: -0.015em;
  margin-top: var(--space-2);
  text-wrap: balance;
}

/* Resserre la distance tagline → hint (qui sont les 2 derniers éléments) */
.welcome__tagline + .welcome__hint {
  margin-top: calc(var(--space-5) * -1 + var(--space-1));
}

/* Mot souligné — réplique de .hero__prenom (notionclub) */
.welcome__highlight {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.welcome__highlight-text {
  position: relative;
  z-index: 1;
}

.welcome__underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.32em;
  color: var(--color-accent);
  pointer-events: none;
  overflow: visible;
}

.welcome__underline path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: welcome-underline-draw 1100ms cubic-bezier(0.65, 0, 0.35, 1) 600ms
    forwards;
}

@keyframes welcome-underline-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.welcome__lead {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 38ch;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .welcome__lead {
    font-size: var(--font-size-md);
  }
}

.welcome__hint {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  opacity: 0.7;
  font-size: var(--font-size-xs);
  font-weight: 400;
}

.welcome__hint:empty {
  display: none;
}

.welcome__hint kbd {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--color-border-default);
  background: var(--color-surface-muted);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--color-text-primary);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.welcome__hint kbd + kbd {
  margin-left: 2px;
}

/* feedback overlay supprimé — le pulse est sur les boutons d'action */

/* =============================================================================
   Bouton CTA (réplique de .cta__button avec son shine animé)
   ============================================================================= */

.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--color-accent);
  color: var(--color-surface-muted);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  padding: 14px var(--space-7);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px -6px rgba(224, 98, 90, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -6px rgba(224, 98, 90, 0.55),
    0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.btn-cta__shine {
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 80%
  );
  z-index: 1;
  pointer-events: none;
  animation: cta-shine 3.5s ease-in-out infinite;
}

@keyframes cta-shine {
  0% { left: -50%; }
  60%, 100% { left: 120%; }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px var(--space-7);
  border-radius: var(--radius-xl);
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-default);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  transition: transform var(--duration-fast) ease,
    background-color var(--duration-fast) ease;
}

.btn-ghost:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-3);
  transition: color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.btn-icon:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-raised);
}

.btn-icon:active {
  transform: scale(0.96);
}

/* =============================================================================
   Quiz : header, deck, actions
   ============================================================================= */

/* Quiz screen : header (barre de progression) ancré en haut, puis le groupe
   deck + actions est centré verticalement dans l'espace restant.
   Auto-margin top sur deck + auto-margin bottom sur actions répartissent
   équitablement l'espace au-dessus du deck et sous les actions. */
.screen--quiz {
  align-items: center;
  justify-content: flex-start;
  padding-bottom: max(var(--space-7), env(safe-area-inset-bottom));
}

.quiz__header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.progress__bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
}

.progress__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--color-accent);
  border-radius: inherit;
  transition: width 0.4s var(--ease);
}

.progress__count {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-semibold);
  min-width: 38px;
  text-align: right;
}

/* Deck — auto-top + 28px gap aux actions ; le auto-bottom des actions
   équilibre la distribution verticale sous le header. Hauteur revue à la
   hausse pour que les sous-titres longs ne fassent pas déborder le footer. */
.deck {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 460px;
  height: min(60dvh, 480px);
  margin: auto auto 28px;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .deck {
    height: min(58dvh, 500px);
    margin-bottom: 36px;
  }
}

.card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(88vw, 420px);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  padding: var(--space-7) var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform, opacity;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease),
    box-shadow var(--duration-slow) ease;
  overflow: hidden;
}

@media (min-width: 768px) {
  .card {
    padding: var(--space-8);
  }
}

.card.is-dragging {
  transition: none;
  cursor: grabbing;
}

.card.is-back {
  transform: translateY(14px) scale(0.96);
  opacity: 0.85;
  box-shadow: var(--shadow-3);
  pointer-events: none;
}

.card.is-back-2 {
  transform: translateY(26px) scale(0.92);
  opacity: 0.55;
  box-shadow: none;
  pointer-events: none;
}

.card.is-gone-left {
  transform: translate3d(-160%, 40px, 0) rotate(-22deg) !important;
  opacity: 0 !important;
}

.card.is-gone-right {
  transform: translate3d(160%, 40px, 0) rotate(22deg) !important;
  opacity: 0 !important;
}

/* Label "Ça match ?" en haut de chaque carte */
.card__match-label {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-align: center;
  padding-bottom: var(--space-3);
  flex-shrink: 0;
}

.card__body {
  flex: 1 1 0;
  min-height: 0;        /* permet au body de rétrécir si le footer est sur 2 lignes */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--space-5);  /* 16px (vs 20px) — laisse plus de place au footer */
  padding: var(--space-2) var(--space-1);
}

.card__emoji {
  font-size: clamp(96px, 26vw, 132px);
  line-height: 1;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.08));
}

@media (min-width: 768px) {
  .card__emoji {
    font-size: clamp(108px, 14vw, 132px);
  }
}

/* Image animée (Telegram emoji webp) en remplacement de l'emoji statique */
.card__visual {
  width: clamp(108px, 28vw, 168px);
  height: clamp(108px, 28vw, 168px);
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.08));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  flex-shrink: 0;
}

.card__title {
  font-size: clamp(24px, 6.2vw, 28px);
  font-weight: var(--font-weight-semibold);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  max-width: 22ch;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .card__title {
    font-size: 28px;
  }
}

.card__subtitle {
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 32ch;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .card__subtitle {
    font-size: var(--font-size-lg);
  }
}

/* Footer — labels Oui/Non spécifiques par carte (texte naturel, pas un label UI).
   margin-top important pour bien décoller du sous-titre, et flex: 0 0 auto pour
   que le footer garde sa hauteur naturelle (n'est pas comprimé par le body
   au-dessus quand le sous-titre est long). */
.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
  margin-top: var(--space-7);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
  flex: 0 0 auto;
}

.card__footer span {
  flex: 1 1 0;
  min-width: 0;
  max-width: 48%;
}

.card__footer span:first-child {
  text-align: left;
}

.card__footer span:last-child {
  text-align: right;
}

@media (min-width: 768px) {
  .card__footer {
    font-size: 13px;
  }
}

/* Stamps "Oui" / "Non" affichés sur le côté OPPOSÉ au sens du swipe pour
   rester visibles malgré le doigt qui suit la carte sur mobile.
   - Swipe DROITE = "Oui" → stamp à GAUCHE
   - Swipe GAUCHE = "Non" → stamp à DROITE
   Chaque stamp porte aussi son icône (cœur / croix) pour la lisibilité. */
.card__stamp {
  position: absolute;
  top: var(--space-7);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px var(--space-4) 8px var(--space-3);
  border-radius: var(--radius-xs);
  opacity: 0;
  transition: opacity var(--duration-instant) var(--ease);
  pointer-events: none;
  color: var(--color-surface-muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.card__stamp svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.card__stamp--yes {
  left: var(--space-7);
  background: var(--color-accent);
  transform: rotate(-10deg);
}

.card__stamp--no {
  right: var(--space-7);
  background: var(--color-text-primary);
  transform: rotate(10deg);
}

/* ── Nudge doux : guide simple, sans à-coup, pour suggérer le swipe ── */
@keyframes card-nudge {
  0%   { transform: rotate(0deg) translateX(0); }
  28%  { transform: rotate(-2deg) translateX(-8px); }
  50%  { transform: rotate(0deg) translateX(0); }
  72%  { transform: rotate(2deg) translateX(8px); }
  100% { transform: rotate(0deg) translateX(0); }
}

.card.is-nudging {
  animation: card-nudge 2.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

/* ── Pulse des boutons action au moment du commit ── */
@keyframes btn-pulse-yes {
  0%   { transform: scale(1); box-shadow: var(--shadow-3), 0 0 0 0 rgba(224, 98, 90, 0); }
  35%  { transform: scale(1.28); box-shadow: var(--shadow-3), 0 0 0 14px rgba(224, 98, 90, 0.12); }
  75%  { transform: scale(1.06); box-shadow: var(--shadow-3), 0 0 0 8px rgba(224, 98, 90, 0); }
  100% { transform: scale(1); }
}

@keyframes btn-pulse-no {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.24); }
  75%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.action--yes.is-pulsing {
  animation: btn-pulse-yes 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.action--no.is-pulsing {
  animation: btn-pulse-no 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Action bar — flex centré à 2 boutons, le label "Ça match ?" est maintenant
   en haut de chaque carte (card__match-label) */
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto auto;
  padding: 0 var(--space-1);
  flex: 0 0 auto;
}

@media (max-width: 380px) {
  .actions {
    gap: 36px;
  }
}

.action {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-default);
  box-shadow: var(--shadow-3);
  transition: transform var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent;
}

.action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.action:active {
  transform: translateY(0) scale(0.96);
}

.action--no {
  color: var(--color-text-secondary);
}

.action--no:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-raised);
}

.action--yes {
  color: var(--color-accent);
  border-color: rgba(224, 98, 90, 0.35);
}

.action--yes:hover {
  background: rgba(224, 98, 90, 0.06);
  border-color: var(--color-accent);
  box-shadow: 0 6px 16px -2px rgba(224, 98, 90, 0.25),
    var(--shadow-3);
}

/* =============================================================================
   Results
   ============================================================================= */

/* Results — alignement vers le haut (et scroll interne) pour que le H1
   reste haut dans le viewport et laisse de la place au formulaire Fillout
   sans imposer un long scroll. */
.screen--results {
  align-items: center;
  justify-content: flex-start;
  padding-top: var(--space-5);
  padding-bottom: var(--space-7);
  overflow-y: auto;
  max-height: 100dvh;
}

.results {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

/* Le bounce est piloté en JS via WAAPI pour ne pas écraser le shimmer. */

.results__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-4);
  background: rgba(224, 98, 90, 0.1);
  color: var(--color-accent);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-2xl);
  letter-spacing: 0.01em;
}

/* Score — le letter-spacing négatif + background-clip cropait la dernière
   glyph à droite. On neutralise le letter-spacing et on ajoute un pad inline
   d'appoint pour que le "/N" ait bien la place de respirer. */
.results__score {
  font-size: clamp(80px, 18vw, 140px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--color-text-primary);
  padding-inline: 0.06em;
  background: linear-gradient(
      90deg,
      var(--color-accent) 0%,
      var(--color-accent) 35%,
      #f8a69f 50%,
      var(--color-accent) 65%,
      var(--color-accent) 100%
    )
    0% 0% / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: results-shimmer 3.5s linear infinite;
}

@keyframes results-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.results__score-total {
  font-size: 0.45em;
  margin-left: 4px;
  vertical-align: super;
}

.results__title {
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-text-primary);
  text-wrap: balance;
}

.results__lead {
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
  line-height: 1.55;
  max-width: 44ch;
}

.results__link {
  color: var(--color-accent);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  text-decoration-color: rgba(224, 98, 90, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--duration-fast) ease;
}

.results__link:hover {
  text-decoration-color: var(--color-accent);
}

@media (min-width: 768px) {
  .results__lead {
    font-size: var(--font-size-lg);
  }
}

.results__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* =============================================================================
   Mac window — encadré façon fenêtre macOS pour héberger le formulaire Fillout.
   Apparaît en pop-up (fade + scale) une fois le compteur de score terminé.
   ============================================================================= */

.mac-window {
  width: 100%;
  max-width: 560px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  margin-top: var(--space-4);

  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.mac-window.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mac-window__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--space-5);
  background: linear-gradient(to bottom, #f6f6f6, #ececec);
  border-bottom: 1px solid var(--color-border-default);
}

.mac-window__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.mac-window__dot--red    { background: #ff5c60; }
.mac-window__dot--yellow { background: #f5c300; }
.mac-window__dot--orange { background: #32b752; }

.mac-window__body {
  background: var(--color-surface-muted);
}

/* Le div Fillout pose son iframe dedans — on s'assure qu'il prend toute la
   largeur et reste cohérent avec la fenêtre Mac. */
.mac-window__body > div[data-fillout-id] {
  display: block;
  width: 100%;
}

.mac-window__body iframe {
  display: block;
  width: 100%;
  border: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================================
   Reduced motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .btn-cta__shine {
    display: none !important;
  }
  .results__score {
    background: none !important;
    -webkit-text-fill-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
  }
  .welcome__underline path {
    stroke-dashoffset: 0 !important;
  }
  .mac-window {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

/* =============================================================================
   Tighter mobile
   ============================================================================= */

@media (max-width: 380px) {
  .card {
    padding: var(--space-5) var(--space-4);
  }
  .action {
    width: 58px;
    height: 58px;
  }
}
