/* FIRME — accueil façon « application » sur cellulaire (ajouté le 2026-10-16).
   Seulement pour les écrans de 640 px et moins : le formulaire est visible dès l'ouverture.
   Pour revenir à l'ancienne version : retirer la ligne <link ... mobile-app.css> dans index.html. */
@media (max-width: 640px) {
  .site-header { height: 58px; }
  .site-header .brand-tagline { display: none; }

  .home { min-height: 0; padding: 14px 16px 36px; background: #fff; }
  .home-grid { gap: 0; grid-template-columns: minmax(0, 1fr) !important; }
  .home-grid > *, .entry-card form, .entry-card .chips { min-width: 0; max-width: 100%; }
  .home-copy .eyebrow { display: none; }
  .home-copy h1 { order: 1; font-size: 27px; line-height: 1.08; letter-spacing: -.03em; margin: 2px 0 10px; }
  .home-copy .trust-row { order: 2; margin: 0 0 14px; gap: 6px 14px; }
  .home-copy .trust-row li { font-size: 13px; }
  .home-copy .trust-row li:nth-child(4) { display: none; }
  .home-copy > p { order: 8; font-size: 15px; margin: 22px 0 0; }

  /* le formulaire devient l'écran principal */
  .entry-card { order: 3; margin: 0 0 30px; padding: 16px; border-radius: 18px; box-shadow: 0 6px 22px rgba(20,32,51,.07); }
  .entry-card > .badge, .entry-card > h2, .entry-card > p { display: none; }
  .entry-card label, .entry-card .field-label { margin-bottom: 10px; font-size: 13.5px; }
  .entry-card input, .entry-card textarea { margin-top: 4px; min-height: 46px; padding: 11px 12px; border-radius: 12px; }
  .entry-card .form-row-2 { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .entry-card .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 2px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .entry-card .chips::-webkit-scrollbar { display: none; }
  .entry-card .chips button { flex: none; white-space: nowrap; min-height: 38px; font-size: 13.5px; padding: 8px 13px; }
  .entry-card textarea#message { min-height: 70px !important; height: 70px; }
  .entry-card .msg-hint { display: none; }
  .entry-card #startBtn { min-height: 54px; border-radius: 14px; font-size: 16.5px; margin-top: 2px; }
  .entry-card .form-reassure { font-size: 12px; margin: 8px 0 0; }
  .entry-card .ex-link { margin-top: 8px; padding-top: 10px; }
  .entry-card > .resume-link { margin-top: 2px; }

  .home-copy .get-title { order: 6; }
  .home-copy .how { order: 7; }
}

/* ===== Diagnostic (étapes 1 à 8) : chaque écran façon application =====
   Le haut de chaque étape tient dans le premier écran ; le bouton principal reste toujours visible. */
/* « clip » au lieu de « hidden » : même effet (pas de défilement de côté) mais les barres collantes fonctionnent */
html, body { overflow-y: visible !important; overflow-x: clip !important; }
.journey .mq-nav {
  position: sticky; bottom: 0; z-index: 6;
  margin: 6px -4px 0; padding: 14px 4px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 34%);
}
.journey .sum-actions, .journey .competitor-actions, .journey .site-actions, .journey .step-next-actions {
  position: sticky; bottom: 0; z-index: 6;
  margin-bottom: 0; padding: 16px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 30%);
}

@media (max-width: 640px) {
  .journey .step-title { margin-bottom: 12px; }
  .journey .step-title h2 { font-size: 24px; line-height: 1.12; margin: 2px 0 4px; }
  .journey .step-title p { font-size: 14px; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .journey .mq-top { margin-bottom: 8px; }
  .journey .mq-card { padding: 16px 14px 12px; border-radius: 18px; }
  .journey .mq-icon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 8px; }
  .journey .mq-icon svg { width: 20px; height: 20px; }
  .journey .mq-card h3 { font-size: 19px; line-height: 1.2; margin: 0 0 4px; }
  .journey .mq-hint { font-size: 13px; margin: 0 0 10px; }
  .journey .mq-opts { gap: 8px; }
  .journey .mq-opt { min-height: 48px; padding: 9px 12px; font-size: 14px; border-radius: 12px; }
  .journey .mq-more { margin-top: 8px; }
  .journey .step-navigation > span { display: none; }
}
@media (min-width: 641px) and (max-height: 1000px) {
  .journey .step-title { margin-bottom: 14px; }
  .journey .mq-card { padding: 22px 26px 18px; }
  .journey .mq-icon { width: 46px; height: 46px; margin-bottom: 8px; }
  .journey .mq-card h3 { margin: 0 0 4px; }
  .journey .mq-hint { margin-bottom: 12px; }
  .journey .mq-opt { min-height: 50px; padding: 10px 14px; }
}
/* étape 8 : le rapport final a sa propre barre « Abonnement » ; « Revoir le diagnostic » reste à la fin */
.journey #s8 .sum-actions { position: static; padding: 0; background: none; }

/* ===== Version « appli » soignée du formulaire (2026-10-17) — cellulaire seulement =====
   Pour revenir à la version précédente : supprimer ce bloc. */
@media (max-width: 640px) {
  .home { padding: 18px 20px 40px; }
  .home-copy h1 { font-size: 30px; line-height: 1.08; letter-spacing: -.035em; margin: 4px 0 12px; }
  .home-copy .trust-row { margin: 0 0 22px; gap: 8px 14px; }
  .home-copy .trust-row li { font-size: 13px; color: #3d4a5e; }

  /* le formulaire posé directement sur la page, comme une appli */
  .entry-card { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; margin: 0 0 34px; }
  .entry-card label, .entry-card .field-label { font-size: 13px; font-weight: 600; color: #142033; margin: 0 0 16px; letter-spacing: -.005em; }
  .entry-card .opt { font-style: normal; font-weight: 500; color: #8a94a6; }
  .entry-card input, .entry-card textarea {
    display: block; width: 100%; margin-top: 7px; min-height: 52px; padding: 14px 16px;
    font-size: 16px; line-height: 1.35; color: #142033;
    background: #f6f8fb; border: 1px solid #e3e8ef; border-radius: 14px;
    -webkit-appearance: none; appearance: none; box-shadow: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
  }
  .entry-card input::placeholder, .entry-card textarea::placeholder { color: #9aa4b5; }
  .entry-card input:focus, .entry-card textarea:focus { outline: none; background: #fff; border-color: #246bdb; box-shadow: 0 0 0 4px rgba(36,107,219,.12); }
  .entry-card .form-row-2 { display: grid; grid-template-columns: 1fr !important; gap: 0; }
  .entry-card textarea#message { min-height: 96px !important; height: 96px; resize: none; }

  /* objectifs : toutes les options visibles, sans défilement de côté */
  .entry-card .chips { display: flex; flex-wrap: wrap !important; overflow: visible; gap: 8px; margin: 8px 0 12px; padding: 0; }
  .entry-card .chips button {
    flex: 0 0 auto; min-height: 40px; padding: 9px 15px; font-size: 14px; font-weight: 600;
    color: #3d4a5e; background: #fff; border: 1px solid #dfe5ed; border-radius: 999px; white-space: nowrap;
  }
  .entry-card .chips button.on { color: #fff; background: #246bdb; border-color: #246bdb; box-shadow: 0 4px 12px rgba(36,107,219,.25); }

  .entry-card #startBtn {
    min-height: 56px; border-radius: 16px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-top: 6px;
    box-shadow: 0 10px 24px rgba(36,107,219,.28);
  }
  .entry-card #startBtn:active { transform: scale(.985); }
  .entry-card .form-reassure { font-size: 12.5px; margin: 12px 0 0; color: #6b7588; }
  .entry-card .ex-link { margin: 18px 0 0; padding: 14px 0 0; font-size: 15px; }
  .entry-card > .resume-link { display: block; width: 100%; margin: 6px 0 0; padding: 12px 0; font-size: 15px; font-weight: 600; color: #5b6678; text-align: center; }
}

/* ===== Bouton visible dès l'ouverture (2026-10-17) ===== */
@media (max-width: 640px) {
  .home { padding-top: 14px; }
  .home-copy h1 { font-size: 26px; margin: 0 0 16px; }
  .home-copy .trust-row { display: none; }
  .entry-card label, .entry-card .field-label { margin-bottom: 12px; }
  .entry-card input, .entry-card textarea { min-height: 48px; padding: 12px 14px; margin-top: 6px; }
  .entry-card .form-row-2 { grid-template-columns: 1fr 1fr !important; gap: 0 10px; }
  /* objectifs sur une seule ligne, qu'on fait glisser */
  .entry-card .field-label { margin-bottom: 6px; }
  .entry-card .chips {
    flex-wrap: nowrap !important; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    margin: 0 -20px 10px; padding: 2px 20px 4px; gap: 8px;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .entry-card .chips::-webkit-scrollbar { display: none; }
  .entry-card .chips button { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
  .entry-card textarea#message { min-height: 70px !important; height: 70px; line-height: 1.35; }
  .entry-card #startBtn { margin-top: 2px; }
}
@media (max-width: 640px) and (max-height: 700px) {
  .home-copy h1 { font-size: 23px; margin-bottom: 12px; }
  .entry-card textarea#message { min-height: 70px !important; height: 70px; }
}

/* ===== Étape 8 : l'abonnement se prend seulement dans plan.firme.ca (2026-10-17) ===== */
#buyPlan, #stickyBuy, .sticky-buy, div:has(> #closeBuy) { display: none !important; }
#toPlanOv { position: fixed; inset: 0; z-index: 2147483600; background: #fff; display: flex; align-items: center; justify-content: center; animation: tpoIn .2s ease; }
#toPlanOv .tpo-in { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding: 24px; }
#toPlanOv .tpo-logo { display: flex; align-items: center; gap: 12px; }
#toPlanOv .tpo-logo b { font: 800 34px/1 Inter, system-ui, sans-serif; letter-spacing: .02em; color: #246bdb; }
#toPlanOv .tpo-logo span { font: 600 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: .06em; color: #5b6678; text-align: left; }
#toPlanOv .tpo-sp { width: 30px; height: 30px; border: 3px solid #e3e8ef; border-top-color: #246bdb; border-radius: 50%; animation: tpoR .8s linear infinite; }
#toPlanOv p { margin: 0; font: 600 15px/1.4 Inter, system-ui, sans-serif; color: #142033; }
@keyframes tpoR { to { transform: rotate(360deg); } }
@keyframes tpoIn { from { opacity: 0; } }

/* ===== Étape 2 : un seul bouton principal à la fois + courriel trouvé proposé (2026-10-17) ===== */
.question-card:has(#emailBox:not(.hidden)) > .actions { display: none !important; }
.email-found { display: inline-flex; align-items: center; margin: -4px 0 12px; padding: 8px 14px; border: 1px solid #cfe0fa; border-radius: 999px; background: #f2f7ff; color: #246bdb; font: 600 13.5px/1.2 Inter, system-ui, sans-serif; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
