/**
 * Kwit Onboarding — Screen-Specific Styles
 *
 * Styles unique to each screen type. Base layout is in components.css.
 *
 * Screen types:
 *   .screen--welcome     — transparent bg, Lottie overlay, logo + card
 *   .screen--info        — transparent bg, Lottie overlay, badges + bubbles
 *   .screen--transition  — full green bg, Lottie animation, animated text
 *   .screen--form        — white bg, character bubble + input/select content
 *   .loading-screen      — centered Lottie spinner + rotating messages
 *
 * Overlay pattern: welcome + info screens use transparent backgrounds
 * so the persistent Lottie (#persistent-lottie-bg) shows through.
 * Content is placed in a relative overlay div (z-index: 1).
 */

/* ============================================
   WELCOME / INFO SCREENS
   ============================================ */
.screen--welcome {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 0;
  background: transparent;
}

/* Content overlay on top of persistent Lottie bg */
.screen--welcome .welcome-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  padding: var(--space-lg) var(--space-lg) 0;
  min-height: 0;
}

.screen--welcome .welcome-logo-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
}

.screen--welcome .welcome-logo-row img {
  width: 110px;
  height: 110px;
}

.screen--welcome .welcome-card {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-md);
  max-width: 300px;
  flex-shrink: 0;
}

.screen--welcome .welcome-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.screen--welcome .welcome-card__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.screen--welcome .welcome-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0 calc(var(--space-lg) + var(--safe-bottom));
  width: 100%;
  flex-shrink: 0;
}

.screen--welcome .welcome-footer .btn-primary {
  background: white;
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
}

.screen--welcome .welcome-login {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.screen--welcome .welcome-login a {
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}

/* ============================================
   INFO SCREENS (with Lottie bg like welcome)
   ============================================ */
.screen--info {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.screen--info .info-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: var(--space-sm) var(--space-lg) 0;
  min-height: 0;
}

.info-nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--space-sm);
}

.info-nav__back,
.info-nav__skip {
  background: none;
  border: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-xs) 0;
}

.info-avatar {
  margin-bottom: var(--space-sm);
}

.info-avatar img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Badge + bubble group: badge overlaps the top-left of the bubble */
.info-bubble-group {
  position: relative;
  align-self: flex-start;
  max-width: 320px;
}

/* Waiting for its character's turn to speak (second bubble while the
   first one types) — revealed by removing the class */
.info-bubble-group--pending {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.info-bubble-group:not(.info-bubble-group--pending) {
  transition: opacity 360ms var(--ease-out), transform 420ms var(--ease-out);
}

.info-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: white;
  margin-bottom: -15px;
  margin-left: var(--space-sm);
}

.info-badge--primary {
  background: var(--color-primary);
}

.info-badge--secondary {
  background: #F5A0B1;
  margin-top: var(--space-md);
}

.info-bubble {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
  text-align: left;
}

/* Bubble with image left of text (e.g. OMS logo) */
.info-bubble--with-image {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.info-bubble__inline-image {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.info-bubble__text {
  flex: 1;
}

.info-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0 calc(var(--space-lg) + var(--safe-bottom));
  width: 100%;
  flex-shrink: 0;
}

.info-footer .btn-primary {
  background: white;
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
}

/* ============================================
   TRANSITION SCREENS (animated green bg)
   ============================================ */
.screen--transition {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #EAF8FB;
}

.transition-lottie-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.transition-lottie-bg svg {
  width: 100% !important;
  height: 100% !important;
}

.screen--transition .info-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-sm) var(--space-lg) 0;
}

/* Transition screens: badge + bubble group centered horizontally */
.info-bubble-group--centered {
  align-self: center;
}

.transition-bubble {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  /* text-align inherited from .info-bubble: left, like every speech bubble */
  max-width: 320px;
}

.screen--transition .info-footer {
  width: 100%;
  padding-bottom: var(--space-lg);
}

.screen--transition .info-footer .btn-primary {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.screen--transition .info-footer .btn-primary {
  background: white;
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
}

/* ============================================
   INFO SCREEN (OMS, stats, community, etc.)
   ============================================ */
.screen--info {
  padding-top: var(--space-lg);
  justify-content: flex-start;
}

.screen--info .screen__body {
  justify-content: flex-start;
}

.screen--info .character-bubble {
  margin-bottom: var(--space-md);
}

.info-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.info-content__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.info-content__text {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.info-content__image {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) 0;
}

.info-content__image img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
}

/* ============================================
   FORM SCREENS
   ============================================ */
.screen--form {
  padding-top: var(--space-sm);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Hold-to-sign: the rings scale far beyond the viewport — clip instead of
   scrolling, otherwise Firefox flashes a scrollbar on each hold tick */
.screen--form.screen--clip {
  overflow: hidden;
}

.screen--form .character-bubble {
  margin-bottom: var(--space-md);
}

.screen--form .back-btn {
  margin-bottom: var(--space-xs);
}

/* No-back screens: pad the header down to where it sits when the back
   button (~42px incl. margin) is present, so the character doesn't jump */
.screen--form > .character-bubble:first-child {
  margin-top: 42px;
}

/* ============================================
   PHASE PRESENTATION SCREENS
   ============================================ */
.phase-presentation {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.phase-presentation__image {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
}

.phase-presentation__image img {
  max-width: 160px;
  max-height: 160px;
  object-fit: contain;
}

.phase-presentation__header {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-align: center;
}

.phase-presentation__content {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   BENEFITS SUMMARY SCREEN
   ============================================ */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ============================================
   COMMUNITY POST (mocked — try-count-transition)
   ============================================ */
/* Avatars illustration: the SVG is pre-cropped at its bottom edge so the
   card sits flush below it (iOS: VStack spacing 0, no overlap). Width
   mirrors iOS: 64pt side padding + 0.8 scale ≈ 54% of screen width. */
.community-illustration {
  display: block;
  width: 54%;
  max-width: 220px;
  margin: 0 auto;
}

/* Flush contact with the card (iOS: VStack spacing 0) — this -12px margin
   cancels the .form-body flex gap, and overrides the card's own top margin */
.community-illustration + .community-post {
  margin-top: calc(-1 * var(--space-sm));
}

.community-post {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-top: var(--space-sm);
}

.community-post__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.community-post__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.community-post__name-col {
  display: flex;
  flex-direction: column;
}

.community-post__name {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.community-post__time {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.community-post__title {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  margin-bottom: 4px;
}

.community-post__content {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  white-space: pre-line;
  margin-bottom: var(--space-sm);
}

.community-post__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-yellow);
  color: #6B5200;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: var(--space-sm);
}

.community-post__tag svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.community-post__reactions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* ============================================
   DOWNLOAD CTA SCREEN
   ============================================ */
.screen--download {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-xl);
}

.download-badges {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.download-badges img {
  height: 48px;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.screen--login {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  overflow: hidden;
  /* clip, et non hidden : le navigateur ne peut pas faire défiler l'écran
     pour montrer un champ de la feuille de connexion. Avec hidden, il le
     faisait, la feuille remontait hors de l'écran et restait bloquée. */
  overflow: clip;
  background: linear-gradient(180deg, #DCEEFF 0%, #E7F6E1 55%, #B8E0A8 100%);
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.login-bg svg {
  width: 100% !important;
  height: 100% !important;
}

.screen--login > .back-btn,
.screen--login > .login-header,
.screen--login > .login-body {
  position: relative;
  z-index: 1;
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--space-xl);
  gap: var(--space-md);
}

.login-header__logo {
  width: 96px;
  height: auto;
}

.login-header__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.login-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--space-xl);
}

.login-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Provider buttons (Apple/Google/Email) */
.btn-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn-provider--apple {
  background: #000;
  color: #fff;
}

.btn-provider--google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid var(--color-border);
}

.btn-provider--email {
  background: var(--color-primary);
  color: #fff;
}

.btn-provider__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-provider__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.btn-secondary,
.btn-outline {
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* Provider buttons need a bit more vertical room than the default btn-primary */
.btn-provider {
  padding: 16px 24px;
  line-height: 1.2;
}

/* Email form */
.login-email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.login-email-form--bare {
  background: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.login-email-form__title {
  text-align: center;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

.btn-link {
  background: none;
  border: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  padding: var(--space-sm);
}

/* Bottom sheet (other methods) — absolute, not fixed: it is appended to the
   login screen and must stay within the app column (Safari sized it to the
   full viewport otherwise) */
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 200ms ease;
}

.sheet {
  width: 100%;
  max-width: 480px;
  /* Jamais plus haute que l'écran (clavier ouvert, messages d'erreur) :
     au-delà, elle défile au lieu de couper le formulaire. */
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-lg) var(--space-lg) calc(var(--space-2xl) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.sheet__title {
  text-align: center;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.sheet--visible {
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Legal consent modal — absolute for the same containment reason as .sheet-overlay */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: var(--space-lg);
  animation: fadeIn 200ms ease;
}

.modal {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.modal__title {
  text-align: center;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
}

.legal-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  cursor: pointer;
}

.legal-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.legal-row__text a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

/* ══════════════════════════════════
   Fagerström result screen
   ══════════════════════════════════ */

.fagerstrom-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-sm);
  /* Level tint — overridden per level below */
  --fagerstrom-accent: var(--color-primary);
}

/* Un accent par palier de score (0-2, 3-4, 5-6, 7-10) */
.fagerstrom-result--none,
.fagerstrom-result--low    { --fagerstrom-accent: #00D68B; }
.fagerstrom-result--medium { --fagerstrom-accent: #FFB020; }
.fagerstrom-result--high   { --fagerstrom-accent: #E74C3C; }

.fagerstrom-result__score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--fagerstrom-accent);
}

.fagerstrom-result__score-value {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.fagerstrom-result__score-max {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}

.fagerstrom-gauge {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
  margin-top: var(--space-2xs);
}

/* Driven by a CSS animation rather than a JS-triggered transition: nothing
   depends on rAF timing, so the bar still lands on its final value even if the
   animation is throttled (e.g. the tab was never visible). --fagerstrom-ratio
   is set inline (0–1). transform is used over width so the fill is not
   re-resolved against a parent that is still settling on screen entry. */
.fagerstrom-gauge__fill {
  width: 100%;
  height: 100%;
  background: var(--fagerstrom-accent);
  transform-origin: left center;
  animation: fagerstrom-fill 900ms var(--ease-out) both;
}

@keyframes fagerstrom-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(var(--fagerstrom-ratio, 0)); }
}

@media (prefers-reduced-motion: reduce) {
  .fagerstrom-gauge__fill { animation-duration: 1ms; }
}

.fagerstrom-gauge__scale {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.fagerstrom-result__title {
  margin-top: var(--space-xs);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-align: center;
}

/* Aligné à gauche : le texte de palier fait deux paragraphes,
   centré il devient pénible à lire. */
.fagerstrom-result__text {
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  text-align: left;
}

.fagerstrom-result__footnote {
  margin-top: var(--space-md);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
  color: var(--color-text-muted);
  text-align: center;
}

/* ══════════════════════════════════
   OFFRE PREMIUM
   ══════════════════════════════════ */

.offer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-lg);
  padding: var(--space-lg) var(--space-md);
  background: var(--color-primary-light);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.offer-card__badge {
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-primary);
  border-radius: var(--radius-full);
  color: #FFFFFF;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.offer-card__price {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  line-height: var(--line-height-tight);
}

.offer-card__period {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.offer-fine-print {
  margin-top: var(--space-md);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
  color: var(--color-text-muted);
  text-align: center;
}

/* ============================================
   PROFIL DE FUMEUR (résultat du questionnaire)
   ============================================ */

.profile-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-sm);
  /* Teinte du profil — surchargée par profil ci-dessous */
  --profile-accent: var(--color-primary);
}

.profile-result--ritual    { --profile-accent: #7C5CFF; }
.profile-result--emotional { --profile-accent: #FF6B8A; }
.profile-result--social    { --profile-accent: #FFB020; }
.profile-result--automatic { --profile-accent: #00B8D9; }

.profile-result__image {
  width: 120px;
  height: 120px;
}

.profile-result__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-result__badge {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--profile-accent);
}

.profile-result__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  text-align: center;
  line-height: var(--line-height-tight);
}

/* Aligné à gauche : la description fait deux paragraphes,
   centrée elle devient pénible à lire. */
.profile-result__text {
  margin-top: var(--space-2xs);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  text-align: left;
}

.profile-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.profile-benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  animation: profile-benefit-in 380ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes profile-benefit-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-benefit { animation-duration: 1ms; animation-delay: 0ms; }
}

/* Puce cochée dessinée en CSS — pas d'asset dédié pour ce seul usage */
.profile-benefit__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  position: relative;
}

.profile-benefit__check::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 8px;
  width: 5px;
  height: 10px;
  border: solid var(--color-primary-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.profile-benefit__text {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
}

/* ============================================
   ÉCRANS DE FEEDBACK (type « message »)
   ============================================ */

/* Ces écrans portent peu de contenu : centré verticalement, le bloc respire
   au lieu de flotter en haut d'une page vide. `safe` évite que le haut
   devienne inatteignable quand le texte est plus grand que l'écran ; les
   navigateurs qui ne le connaissent pas ignorent la règle et alignent en
   haut, ce qui reste correct. */
.screen--message .form-body,
.screen--review .form-body {
  justify-content: safe center;
  padding-bottom: var(--space-lg);
}

.message-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Médaillon du personnage, à cheval sur le haut de la carte */
.message-medallion {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
  margin-bottom: -74px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 50% 35%, #FFFFFF 0%, var(--color-primary-light) 100%);
  border: 4px solid var(--color-card);
  box-shadow: var(--shadow-sm);
  animation: message-medallion-in 520ms var(--ease-out) both;
}

/* Le dessin est carré, le médaillon est rond : au-delà du carré inscrit
   dans le cercle (diamètre / 1,41 ≈ 99 px pour 140 px intérieurs), les coins
   de l'illustration débordent du disque. 100 px est donc le maximum tenable,
   et c'est déjà nettement plus généreux que la première version. */
.message-medallion > * {
  width: 100px;
  height: 100px;
  margin: 0;
}

.message-medallion img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes message-medallion-in {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: none; }
}

.message-card {
  width: 100%;
  padding: calc(74px + var(--space-lg)) var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background:
    linear-gradient(180deg, var(--color-primary-bg) 0%, rgba(255, 255, 255, 0) 45%),
    var(--color-card);
  box-shadow: var(--shadow-sm);
  text-align: center;
  animation: message-card-in 520ms var(--ease-out) both;
  animation-delay: 80ms;
}

@keyframes message-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.message-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

.message-card__text {
  margin-top: var(--space-md);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.message-card .note-card {
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  .message-medallion,
  .message-card { animation-duration: 1ms; animation-delay: 0ms; }
}

/* Liste de bénéfices à l'intérieur d'une carte de feedback : la carte centre
   son texte, mais des lignes « icône + texte » centrées se lisent mal. */
.message-card .presentation-items {
  text-align: left;
  margin-top: var(--space-lg);
}

/* ============================================
   FEEDBACK FAÇON ONBOARDING D'ORIGINE (à l'essai)
   ============================================ */

.screen--ob {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Décor animé plein écran, ancré en bas comme dans l'application */
.ob-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ob-bg svg {
  width: 100% !important;
  height: 100% !important;
}

.screen--ob > .brand-bar,
.screen--ob > .back-btn,
.screen--ob > .ob-content,
.screen--ob > .ob-character,
.screen--ob > .screen__footer {
  position: relative;
  z-index: 1;
}

.ob-content {
  padding: var(--space-lg) var(--space-lg) 0;
}

.ob-badge {
  display: inline-block;
  margin-left: var(--space-sm);
  margin-bottom: -15px;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #FFFFFF;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.ob-bubble {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.ob-bubble__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

.ob-bubble__text {
  margin-top: var(--space-sm);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

/* Le personnage occupe l'espace restant et se pose sur les collines du
   décor ; il est volontairement rogné par le bas, comme dans l'application. */
.ob-character {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: calc(-1 * var(--space-md));
}

.ob-character > * {
  width: 190px;
  height: 190px;
  max-height: 100%;
  margin: 0;
}

.ob-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

/* ── Écran d'accueil : carte centrée à pointe basse, duo de personnages ── */

.screen--ob-welcome > .ob-duo {
  position: relative;
  z-index: 1;
}

.ob-hero {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* Pointe vers le bas, tournée vers les personnages */
.ob-hero::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: var(--color-card);
  border-bottom-width: 0;
}

.ob-hero__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

.ob-hero__text {
  margin-top: var(--space-md);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.ob-duo {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: calc(-1 * var(--space-md));
}

.ob-duo__slot {
  width: 150px;
  max-width: 42%;
  max-height: 100%;
}

.ob-duo__slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}

/* ============================================
   PROOF SCREEN (chiffre-phare, tuiles, note des stores)
   ============================================ */
.screen--proof .form-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.proof {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.proof-hero,
.proof-tile,
.proof-rating {
  opacity: 0;
  transform: translateY(8px);
  animation: staggerFadeIn 350ms var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}

.proof-hero {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-primary-light);
  border-radius: var(--radius-xl);
}
.proof-hero__image {
  width: 76px;
  height: auto;
  display: block;
  margin: 0 auto var(--space-sm);
}
.proof-hero__value {
  font-size: 2.25rem;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-primary-dark);
  letter-spacing: -0.01em;
}
.proof-hero__label {
  margin-top: var(--space-2xs);
  font-size: var(--font-size-md);
  color: var(--color-text);
}

.proof-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}
.proof-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border-radius: var(--radius-lg);
}
/* Palette tertiaire Kwit */
.proof-tile--green { background: #E4FBEE; }
.proof-tile--blue { background: #E9EFFD; }
.proof-tile--yellow { background: #FFF7DF; }

.proof-tile__image {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.proof-tile__label {
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: var(--color-text-secondary);
}
.proof-tile__label strong { color: var(--color-text); }

/* Anneau de progression : --p en pourcentage */
.proof-ring {
  --p: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, #E4FBEE 76%, transparent 77%),
    conic-gradient(var(--color-primary) calc(var(--p) * 1%), rgba(0, 181, 118, 0.15) 0);
}
.proof-ring__value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.proof-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.proof-rating__score {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.proof-rating__value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
.proof-rating__stars { height: 16px; width: auto; }
.proof-rating__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-align: center;
}

/* Tuile de note : « 4,5 » + cinq étoiles */
.proof-score {
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.proof-score__value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  color: var(--color-text);
}
.proof-score__stars { height: 14px; width: auto; }
