/* La premiere ouverture de Forme : le viking accueille et pose les questions.
   Utilise par l'application (index.html) et par la page de demonstration
   (bienvenue.html). Tout est range sous .bienvenue et prefixe bv- : les noms
   courts (jeton, choix, fiche...) existent deja dans l'application, et ses
   regles se seraient melangees a celles-ci.

   Meme monde que l'application : fond presque noir, fiche un cran plus
   claire, vert d'action. Le viking occupe le haut de l'ecran, la question le
   bas, au pouce. */
.bienvenue {
  --bv-fond: #0b0e14;
  --bv-fond2: #171b25;
  --bv-fond3: #212736;
  --bv-bord: #2f3648;
  --bv-texte: #e8eaed;
  --bv-texte2: #a4aab6;
  --bv-actif: #4ade80;
  --bv-actif2: #22c55e;
  --bv-alerte: #f87171;
  --bv-attention: #fbbf24;
  --bv-basSur: env(safe-area-inset-bottom, 0px);
  --bv-hautSur: env(safe-area-inset-top, 0px);
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  /* Plus de defilement de toute la page (Julien, 28/10/2026 : « il faut a
     tout prix eviter le scroll vertical »). Chaque etape est dessinee pour
     tenir dans un telephone de 390 x 844 ; si un ecran plus petit (ou une
     police agrandie dans les reglages) deborde quand meme, seule la zone des
     questions defile, le viking et le bouton restent en place. */
  height: 100dvh; overflow: hidden;
  overscroll-behavior: contain;
  color: var(--bv-texte);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.bienvenue * { box-sizing: border-box; }
.bienvenue ::selection { background: rgba(74, 222, 128, .35); color: #fff; }
/* :where() : sans poids, sinon cette regle passait devant la taille de chaque
   bouton (.bv-jeton...) et tout s ecrivait en grand. */
:where(.bienvenue) :where(input, button) { font: inherit; color: inherit; }
.bienvenue button { cursor: pointer; }
.bienvenue :focus-visible { outline: 2px solid var(--bv-actif); outline-offset: 2px; }

/* --- La scene du viking --- */
.bv-scene {
  position: relative;
  flex: 0 0 auto;
  /* Un quart d'ecran au plus : le viking parle, mais c'est la question qui
     doit avoir la place. */
  height: clamp(150px, 22dvh, 200px);
  margin-top: var(--bv-hautSur);
}
.bv-scene svg.bv-theatre { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* La bulle reprend celle de l'application (compagnon.css) ; ici elle se
   place a cote de sa tete plutot qu'au-dessus d'une tuile. */
.bv-scene .vk-bulle { max-width: min(230px, 58vw); font-size: 14px; line-height: 1.35; transform-origin: 0 70%; }
.bv-scene .vk-bulle::before {
  content: ''; position: absolute; left: -9px; top: 20px;
  border: 8px solid transparent; border-right-color: #0d1017; border-left: 0;
}
.bv-scene .vk-bulle::after {
  content: ''; position: absolute; left: -6.5px; top: 21.5px;
  border: 6.5px solid transparent; border-right-color: var(--vk-papier); border-left: 0;
}
.bv-sol {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: radial-gradient(60% 100% at 32% 0%, rgba(74, 222, 128, .10), transparent 70%);
  pointer-events: none;
}

/* --- La fiche : la question du moment --- */
.bv-fiche {
  position: relative;
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--bv-fond2);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .35);
  padding: 12px 16px 0;
  z-index: 2;
}
.bv-avancement { display: flex; gap: 4px; margin: 0 0 12px; flex: 0 0 auto; }
.bv-avancement i { flex: 1; height: 3px; border-radius: 2px; background: var(--bv-fond3); transition: background .3s; }
.bv-avancement i.bv-faite { background: var(--bv-actif2); }
/* La seule zone qui peut defiler, et seulement si l'ecran est trop petit. */
.bv-contenu { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.bv-contenu::-webkit-scrollbar { display: none; }
.bv-contenu.bv-entre { animation: bv-entre 360ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes bv-entre {
  from { opacity: 0; transform: translateY(14px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}
.bienvenue h1.bv-question { font-size: 1.18rem; line-height: 1.25; margin: 0 0 4px; font-weight: 650; letter-spacing: -.01em; text-wrap: balance; }
.bienvenue p.bv-pourquoi { font-size: .82rem; line-height: 1.45; color: var(--bv-texte2); margin: 0 0 12px; max-width: 60ch; text-wrap: pretty; }

.bv-bas {
  display: flex; gap: 10px; align-items: center; margin: 0 -16px;
  padding: 10px 16px calc(12px + var(--bv-basSur));
  flex: 0 0 auto;
  /* Toujours au pouce : sur une etape longue, le bouton reste en bas de
     l'ecran au lieu de partir avec la liste. */
  position: sticky; bottom: 0; z-index: 3;
  background: linear-gradient(to top, var(--bv-fond2) 72%, rgba(23, 27, 37, 0));
}
.bv-retour { flex: 0 0 auto; background: none; border: none; color: var(--bv-texte2); padding: 12px 8px; font-size: .88rem; }
.bv-retour[hidden] { display: none; }
.bv-suite {
  flex: 1; min-height: 46px; border-radius: 13px; border: none;
  background: var(--bv-actif2); color: #06210f; font-weight: 650; font-size: .92rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.bv-suite:active { transform: scale(.98); }
.bv-suite:disabled { opacity: .35; box-shadow: none; cursor: default; }

/* --- Les controles --- */
/* Le titre d'un groupe : toujours le meme ecart, plus au-dessus qu'en dessous. */
.bienvenue label.bv-nom { display: block; font-size: .74rem; color: var(--bv-texte2); margin: 12px 0 5px; font-weight: 600; }
.bv-champ-ligne { display: flex; align-items: center; gap: 10px; }
.bv-champ-ligne span { color: var(--bv-texte2); font-size: .82rem; flex: 0 0 auto; }
.bienvenue input.bv-saisie {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 11px;
  background: var(--bv-fond3); border: 1px solid var(--bv-bord); font-size: .95rem;
  color-scheme: dark; caret-color: var(--bv-actif);
}
.bv-oeil-boite { position: relative; flex: 1 1 auto; }
.bienvenue .bv-oeil-boite input.bv-saisie { padding-right: 46px; }
.bv-oeil { position: absolute; right: 0; top: 0; height: 100%; width: 44px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--bv-texte2); cursor: pointer; padding: 0; min-height: 0; }
.bv-oeil:hover { color: var(--bv-actif2); }
.bienvenue input.bv-saisie::placeholder { color: #7c8392; }
.bienvenue input.bv-saisie:focus { border-color: var(--bv-actif2); outline: none; }
.bv-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.bv-jetons { display: flex; flex-wrap: wrap; gap: 6px; }
/* Une rangee de pastilles juste apres une case a cocher ou une autre rangee :
   le meme ecart qu'entre deux groupes. */
.bv-ligne-choix + .bv-jetons, .bv-jetons + .bv-jetons { margin-top: 10px; }
.bv-jeton {
  min-height: 36px; padding: 0 13px; border-radius: 18px;
  background: var(--bv-fond3); border: 1px solid var(--bv-bord); font-size: .82rem;
  transition: background .2s, border-color .2s;
}
.bv-jeton.bv-on { background: rgba(34, 197, 94, .16); border-color: var(--bv-actif2); color: #bbf7d0; }

.bv-choix { display: flex; flex-direction: column; gap: 6px; }
/* Deux colonnes, pour les listes de choix courts (ce que tu viens chercher). */
.bv-choix.bv-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bv-ligne-choix {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  min-height: 44px; padding: 7px 12px; border-radius: 12px;
  background: var(--bv-fond3); border: 1px solid var(--bv-bord);
  transition: background .2s, border-color .2s;
}
.bv-ligne-choix .bv-titre { font-size: .86rem; font-weight: 600; display: block; line-height: 1.25; }
.bv-ligne-choix .bv-detail { font-size: .72rem; color: var(--bv-texte2); display: block; margin-top: 1px; line-height: 1.3; }
.bv-ligne-choix.bv-on { background: rgba(34, 197, 94, .1); border-color: var(--bv-actif2); }
.bv-ligne-choix.bv-on .bv-detail { color: #9fe3b8; }
.bv-ligne-choix svg { flex: 0 0 auto; }
/* Les drapeaux de l'etape langue : un lisere clair, sinon le blanc d'un
   drapeau se perd et le bleu fonce se fond dans le fond sombre. */
.bv-drapeau { width: 28px; height: 21px; border-radius: 4px; flex: 0 0 auto; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.bv-langues .bv-ligne-choix { min-height: 50px; }

/* L'etape langue refaite (06/10/2026, « il faut que la liste soit belle ») :
   la langue detectee en grand, puis toutes les autres en grille de deux, le
   drapeau devant le nom. Une tuile choisie s'allume en vert. */
.bv-langue {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  min-height: 36px; padding: 5px 8px; border-radius: 10px;
  background: var(--bv-fond3); border: 1px solid var(--bv-bord);
  transition: background .2s, border-color .2s, transform .15s;
}
.bv-langue:active { transform: scale(.98); }
.bv-langue.bv-on { background: rgba(34, 197, 94, .12); border-color: var(--bv-actif2); }
.bv-langue .bv-drapeau { width: 20px; height: 15px; border-radius: 3px; }
.bv-langue-textes { display: flex; flex-direction: column; min-width: 0; }
/* Un nom long passe a la ligne plutot que d'etre coupe (« Bahasa In... »). */
.bv-langue-nom { font-size: .76rem; font-weight: 550; line-height: 1.15; overflow-wrap: anywhere; }
.bv-langue-sous { font-size: .72rem; color: var(--bv-texte2); margin-top: 1px; }
.bv-langue.bv-on .bv-langue-sous { color: #9fe3b8; }
.bv-langue .bv-coche { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--bv-actif2); border-color: var(--bv-actif2); }
.bv-langue-proposee { min-height: 50px; padding: 8px 12px; gap: 12px; border-radius: 12px; }
.bv-langue-proposee .bv-drapeau { width: 32px; height: 24px; border-radius: 4px; }
.bv-langue-proposee .bv-langue-nom { font-size: .95rem; font-weight: 600; }
.bienvenue div.bv-nom { font-size: .74rem; color: var(--bv-texte2); margin: 12px 0 5px; font-weight: 600; }
/* minmax(0, 1fr) et pas 1fr : sinon un nom long (« Bahasa Indonesia ») elargit
   sa colonne et la grille sort de l'ecran a droite. */
.bv-langues-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.bv-langues-grille .bv-langue { gap: 6px; }
/* La langue choisie dans la grille s'allume en vert : pas de coche en plus,
   elle mangeait la place du nom. */
.bv-langues-grille .bv-langue .bv-coche { display: none; }

/* Le pot de miel de l'inscription : hors de l'ecran, jamais vu ni atteint. */
.bienvenue .bv-pot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* « Tout se change ensuite » : discret, mais present a chaque etape. */
.bienvenue p.bv-modifiable { font-size: .72rem; color: var(--bv-texte2); margin: 12px 0 0; }
.bienvenue p.bv-modifiable-fort { font-size: .74rem; color: var(--bv-texte2); line-height: 1.45; }

/* Le prix : deux formules cote a cote, la complete mise en avant. */
.bv-essai { margin-top: 0; }
.bv-formules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; align-items: start; }
.bv-formule { padding: 14px 12px; border-radius: 16px; background: var(--bv-fond3); border: 1px solid var(--bv-bord); }
.bv-formule-pleine { border-color: var(--bv-actif2); background: linear-gradient(180deg, rgba(34, 197, 94, .14), rgba(34, 197, 94, .04)); }
.bv-formule-nom { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--bv-texte2); }
.bv-formule-pleine .bv-formule-nom { color: #86efac; }
.bv-formule-prix { font-size: 1.5rem; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bv-formule-sous { font-size: .76rem; color: var(--bv-texte2); margin-top: 2px; }
.bv-formule ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 7px; }
.bv-formule li { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; line-height: 1.35; }
.bv-formule li svg { flex: 0 0 auto; margin-top: 1px; }
.bv-abonner {
  width: 100%; min-height: 44px; margin-top: 14px; border-radius: 12px; border: none;
  background: var(--bv-actif2); color: #06210f; font-weight: 700; font-size: .88rem;
}
.bv-abonner:disabled { opacity: .4; cursor: default; }
.bv-coche { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--bv-bord); flex: 0 0 auto; margin-left: auto; display: grid; place-items: center; }
.bv-ligne-choix.bv-on .bv-coche { background: var(--bv-actif2); border-color: var(--bv-actif2); }

.bv-encart {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--bv-fond3); border: 1px solid var(--bv-bord);
  font-size: .76rem; line-height: 1.45; color: var(--bv-texte2);
}
.bv-encart strong { color: var(--bv-texte); }
/* Avant une page de reglage d'Android : ce qu'il faudra y faire. */
.bv-aide-autorisation { margin: 8px 2px 0; font-size: .72rem; line-height: 1.4; color: var(--bv-texte2); }
.bv-encart.bv-vert { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .07); }
.bv-grand-chiffre { font-size: 1.4rem; font-weight: 700; color: var(--bv-texte); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.bv-erreur { color: var(--bv-alerte); font-size: .85rem; min-height: 20px; margin-top: 10px; }
/* Le mail du mot de passe oublie : ou il part, et surtout ou le chercher. */
.bv-envoi { margin-top: 12px; font-size: .88rem; line-height: 1.5; }
.bv-envoi p { margin: 0 0 8px; }
.bv-envoi .bv-spam { font-weight: 800; color: #fbbf24; text-decoration: underline; text-underline-offset: 3px; font-size: .95rem; }
.bienvenue button.bv-lien { color: var(--bv-actif); background: none; border: none; padding: 10px 0; font-size: .84rem; text-decoration: underline; text-underline-offset: 3px; }
/* Un lien par ligne : deux liens cote a cote se lisaient comme une seule phrase. */
.bienvenue button.bv-lien { display: block; }

/* Le billet « gratuit » : un vrai ticket, dentele sur les cotes. */
.bv-billet {
  position: relative; margin: 6px 0 4px; padding: 22px 20px 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, #1d3a2a, #13241c 70%);
  border: 1px solid rgba(74, 222, 128, .35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.bv-billet::before, .bv-billet::after {
  content: ''; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bv-fond2); transform: translateY(-50%);
}
.bv-billet::before { left: -11px; }
.bv-billet::after { right: -11px; }
.bv-billet .bv-prix { font-size: 3.1rem; font-weight: 800; line-height: 1; color: #fff; letter-spacing: -.03em; }
.bv-billet .bv-pour { font-size: 1.15rem; font-weight: 600; color: #86efac; margin-top: 6px; }
.bv-billet .bv-trait { border-top: 1.5px dashed rgba(134, 239, 172, .35); margin: 16px 0 14px; }
.bv-billet ul { margin: 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.8; color: #d6f5e0; }
.bv-billet li { display: flex; gap: 8px; align-items: center; }

/* La fausse fenetre d'Android, pour la demonstration seulement. */
.bv-systeme {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); padding: 24px;
  animation: bv-fondu 200ms ease-out both;
}
@keyframes bv-fondu { from { opacity: 0; } to { opacity: 1; } }
.bv-systeme .bv-boite {
  width: 100%; max-width: 330px; background: #2b2f38; color: #e6e7ea;
  border-radius: 26px; padding: 24px 22px 12px; text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  animation: bv-monte 260ms cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes bv-monte { from { transform: translateY(20px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.bv-systeme .bv-boite svg { margin-bottom: 10px; }
.bv-systeme .bv-boite p { font-size: 1.02rem; line-height: 1.45; margin: 0 0 18px; }
.bv-systeme .bv-boite button {
  display: block; width: 100%; min-height: 46px; border: none; border-radius: 23px;
  background: #3a404c; color: #b9d7ff; font-weight: 600; margin-bottom: 8px;
}
.bv-systeme .bv-etiquette { font-size: .72rem; color: #9aa0ac; margin: 6px 0 4px; }

.bv-resume { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: .82rem; margin: 0; }
.bv-resume dt { color: var(--bv-texte2); }
.bv-resume dd { margin: 0; font-weight: 600; }

.bv-demo {
  position: fixed; top: calc(8px + var(--bv-hautSur)); right: 10px; z-index: 70;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: #fde68a; background: rgba(120, 83, 9, .55); border: 1px solid rgba(251, 191, 36, .5);
  padding: 4px 10px; border-radius: 12px;
}

/* Le compagnon (28/10/2026), presente comme dans Moi > Mon compagnon : des
   onglets pour chaque partie (une seule rangee a la fois, sinon l'etape
   defilait sur deux ecrans), puis des ronds avec le viking qui porte le
   choix. L'apercu, c'est le grand viking de la scene, au-dessus. */
.bv-onglets {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 10px -16px 0; padding: 0 16px 2px;
  mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 20px), transparent);
}
.bv-onglets::-webkit-scrollbar { display: none; }
.bv-onglet {
  flex: 0 0 auto; min-height: 32px; padding: 0 11px; border-radius: 16px;
  background: none; border: 1px solid transparent; color: var(--bv-texte2); font-size: .78rem; white-space: nowrap;
}
.bv-onglet.bv-on { background: var(--bv-fond3); border-color: var(--bv-bord); color: var(--bv-texte); }
.bv-ronds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bv-rond {
  position: relative; width: 52px; height: 52px; padding: 0; border-radius: 50%;
  background: var(--bv-fond3); border: 2px solid var(--bv-bord);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.bv-rond.bv-on { border-color: var(--bv-actif); box-shadow: 0 0 12px -3px rgba(34, 197, 94, .8); }
.bv-rond svg { width: 48px; height: 48px; }
.bv-rond svg, .bv-rond svg * { animation: none !important; transition: none !important; }
.bv-pastille { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.bv-nom-choix { margin-top: 8px; font-size: .74rem; color: var(--bv-texte2); min-height: 1.2em; }

/* Le prix en trois formules, une ligne chacune (28/10/2026). */
.bv-offres { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bv-offre { padding: 9px 12px; border-radius: 12px; background: var(--bv-fond3); border: 1px solid var(--bv-bord); }
.bv-offre-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bv-offre-nom { font-size: .88rem; font-weight: 650; }
.bv-offre-prix { font-size: .88rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bv-offre-prix small { font-size: .7rem; font-weight: 500; color: var(--bv-texte2); }
.bv-offre ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bv-offre li { display: flex; gap: 6px; align-items: flex-start; font-size: .74rem; line-height: 1.35; color: var(--bv-texte2); }
.bv-offre li svg { flex: 0 0 auto; margin-top: 2px; }
.bv-offre-plus { border-color: rgba(34, 197, 94, .5); }
.bv-offre-plus .bv-offre-nom { color: #86efac; }
.bv-offre-premium { border-color: rgba(242, 193, 78, .45); background: linear-gradient(180deg, rgba(242, 193, 78, .07), transparent 70%), var(--bv-fond3); }
.bv-offre-premium .bv-offre-nom { color: #f2c14e; }

@media (prefers-reduced-motion: reduce) {
  .bv-contenu.bv-entre, .bv-systeme .bv-boite { animation: bv-fondu 150ms linear both; }
}

/* Les autorisations sur deux colonnes : petite icone a cote du nom. */
.bv-autorisations .bv-ligne-choix { align-items: flex-start; gap: 6px; padding: 8px 9px; }
.bv-autorisations .bv-ligne-choix svg { width: 16px; height: 16px; margin-top: 1px; }
