/*
 * /mon-idee — parcours « avant rendez-vous », acte « Rever » (AVR5).
 * Reproduit la maquette AVR3 (ecrans 1 a 5 et atterrissage ordinateur).
 * Polices hebergees dans JABAT (css/espace_client/polices, licence OFL) :
 * aucune ressource d'un autre site.
 */

@font-face { font-family: 'Bricolage JABAT'; src: url('../espace_client/polices/bricolage-grotesque-latin-var.woff2') format('woff2-variations'), url('../espace_client/polices/bricolage-grotesque-latin-var.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument JABAT'; src: url('../espace_client/polices/instrument-sans-400-latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument JABAT'; src: url('../espace_client/polices/instrument-sans-500-latin.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument JABAT'; src: url('../espace_client/polices/instrument-sans-600-latin.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Caveat JABAT'; src: url('../espace_client/polices/caveat-600-latin.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --nuit: #0F1B2D; --carte: #18283F; --bord: #2C405E; --piste: #24364F; --creux: #101D30;
  --ambre: #FFB454; --ambre-fonce: #3A2E1C; --encre: #1B1206; --creme: #F6F1E7;
  --gris: #B7C3D6; --gris-clair: #C4CFDF; --fleche: #6F86A8;
  --titre: 'Bricolage JABAT', system-ui, sans-serif;
  --texte: 'Instrument JABAT', system-ui, sans-serif;
  --main: 'Caveat JABAT', 'Segoe Print', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nuit); color: var(--creme); font-family: var(--texte); font-optical-sizing: auto; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--creme); outline-offset: 3px; }
/* Le titre recoit le focus a chaque changement d'ecran (lecteurs d'ecran) : sans contour. */
h1[tabindex="-1"]:focus { outline: none; }

.ecran { min-height: 100vh; min-height: 100dvh; }

/* --- Bouton principal --- */
.btn-principal { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 64px; flex-shrink: 0;
  border: 0; border-radius: 20px; background: var(--ambre); color: var(--encre); cursor: pointer;
  font-family: var(--titre); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.btn-principal svg { color: var(--encre); }
.btn-principal:disabled { opacity: .45; cursor: default; }
.btn-principal[aria-busy="true"] { opacity: .7; cursor: progress; }

/* --- Atterrissage : telephone (AVR5d, maquette AVR5d) ---
   L'ecran tient en 390 x 700 sans defiler : c'est la scene qui retrecit. */
.lp { position: relative; overflow: hidden; display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 560px; }
.lp-scene { position: relative; flex: 0 1 288px; min-height: 200px; overflow: hidden; }
/* Le dessin garde ses proportions, cale en bas : quand la place manque, c'est le ciel qui part. */
.lp-dessin { position: absolute; left: 0; bottom: -70px; width: 100%; aspect-ratio: 390 / 430; }
.lp-dessin > svg { display: block; width: 100%; height: 100%; }
.lp-scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(to bottom, rgba(15, 27, 45, 0), var(--nuit)); pointer-events: none; }
/* La question manuscrite et sa fleche, placees en proportion du dessin : la pointe
   touche le toit de l'extension (71 % de la largeur, 49,5 % de la hauteur). */
.pensee { position: absolute; right: 5%; bottom: calc(50.5% + 52px); margin: 0; font-family: var(--main); font-weight: 600; font-size: 31px; line-height: 1; color: var(--ambre); text-align: right; transform: rotate(-5deg); }
.lp-dessin > .pensee-fleche { position: absolute; left: calc(71% - 11px); top: calc(49.5% - 44px); width: 66px; height: 56px; }
.lp-texte { flex: 1 0 auto; display: flex; flex-direction: column; padding: 0 20px 18px; }
/* Telephone : la marque en haut a gauche, par-dessus la scene (.lp est le repere). */
.marque { position: absolute; top: 22px; left: 24px; z-index: 1; }
.lp-corps { flex-grow: 1; display: flex; flex-direction: column; }
.accroche { font-family: var(--main); font-weight: 600; font-size: 30px; line-height: 1; color: var(--ambre); transform: rotate(-3deg); transform-origin: left center; }
.lp h1 { margin: 0; font-family: var(--titre); font-weight: 800; font-size: 33px; line-height: 1.03; letter-spacing: -0.025em; text-wrap: balance; }
.lp-question { margin: 14px 0 0; font-size: 19px; font-weight: 500; line-height: 1.3; }
.lp-reponse { margin: 2px 0 0; font-family: var(--titre); font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; color: var(--ambre); }
.lp-bas { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.trio { display: flex; justify-content: space-between; gap: 8px; padding: 0 6px; }
.trio span { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.trio svg { flex-shrink: 0; }
.mention { margin: 0; text-align: center; font-size: 13px; color: var(--gris); }

/* Marque du tenant : le logo (souvent sombre, sur fond clair) est pose sur une
   pastille claire, sinon il disparaitrait sur la nuit de la maquette. */
.marque-logo { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 12px; background: var(--creme); }
.marque-logo img { display: block; height: 28px; width: auto; max-width: 180px; }
.marque-nom { font-family: var(--titre); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1; }

/* --- Atterrissage : ordinateur (deux colonnes, memes textes, la question sur la scene) --- */
@media (min-width: 821px) {
  .lp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); height: auto; min-height: 100vh; }
  .lp-scene { order: 2; min-height: 480px; margin: 24px 24px 24px 0; border-radius: 28px; border: 1px solid var(--bord); background: var(--nuit); }
  .lp-scene::after { display: none; }
  .lp-dessin { bottom: 0; }
  .pensee { font-size: 54px; bottom: calc(50.5% + 88px); }
  .lp-dessin > .pensee-fleche { left: calc(71% - 18px); top: calc(49.5% - 73px); width: 110px; height: 93px; }
  .lp-texte { order: 1; padding: 48px 7% 48px 9%; gap: 32px; }
  .marque { position: static; }
  .marque-logo img { height: 34px; }
  .marque-nom { font-size: 26px; }
  .lp-corps { flex-grow: 0; margin-block: auto; }
  .accroche { font-size: 38px; }
  .lp h1 { font-size: 3.75rem; line-height: 0.98; letter-spacing: -0.03em; }
  .lp-question { margin-top: 26px; font-size: 1.5rem; }
  .lp-reponse { margin-top: 4px; font-size: 2rem; }
  .lp-bas { margin-top: 40px; padding-top: 0; gap: 22px; align-items: flex-start; }
  .trio { justify-content: flex-start; gap: 28px; padding: 0; }
  .trio span { font-size: 16px; }
  .lp-bas .btn-principal { width: auto; height: 68px; padding: 0 40px; border-radius: 22px; font-size: 22px; gap: 12px; }
  .mention { text-align: left; font-size: 14px; }
}

/* --- Ecrans de question : une colonne de la largeur d'un telephone --- */
.q { width: 100%; max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; padding: 20px 20px 24px; }
.q-haut { display: flex; align-items: center; gap: 14px; }
.retour { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border-radius: 50%;
  background: var(--carte); border: 1px solid var(--bord); color: var(--creme); cursor: pointer; }
.actes { display: flex; gap: 6px; flex-grow: 1; }
.actes span { flex-grow: 1; height: 6px; border-radius: 3px; background: var(--piste); }
.actes span.on { background: var(--ambre); }
.q-titre { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.q-titre > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.sur-titre { font-family: var(--main); font-weight: 600; font-size: 26px; line-height: 1; color: var(--ambre); }
.q h1 { margin: 0; font-family: var(--titre); font-weight: 800; font-size: 36px; line-height: 1.05; letter-spacing: -0.025em; }
.points { display: flex; gap: 6px; padding-bottom: 10px; }
.points span { width: 8px; height: 8px; border-radius: 50%; background: var(--bord); }
.points span.on { background: var(--ambre); }

.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choix { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 160px; padding: 12px;
  border-radius: 24px; background: var(--carte); border: 2px solid var(--piste); color: var(--creme); cursor: pointer; }
.choix .libelle { font-size: 17px; font-weight: 600; text-align: center; }
.choix[aria-pressed="true"] { background: var(--ambre-fonce); border-color: var(--ambre); }
.choix[aria-pressed="true"] > svg { color: var(--ambre); }
.coche { position: absolute; top: 10px; right: 10px; display: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ambre); color: var(--encre); z-index: 1; }
.choix[aria-pressed="true"] .coche { display: flex; }
/* AVR5b « Quelles pieces ? » : 9 tuiles sur 3 colonnes + « Autre » en pleine
   largeur, tout visible sans defiler en 390 x 844 (maquette AVR5b). */
.grille.pieces { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tuile { height: 132px; gap: 9px; padding: 10px 6px; border-radius: 20px; }
.tuile > svg { width: 46px; height: 46px; }
.tuile .libelle { font-size: 15px; line-height: 1.15; }
.tuile .coche { top: 7px; right: 7px; width: 24px; height: 24px; }
.tuile .coche svg { width: 15px; height: 15px; stroke-width: 3.2; }
.tuile.large { grid-column: 1 / -1; flex-direction: row; height: 64px; gap: 12px; }
.tuile.large > svg { width: 30px; height: 30px; }
.tuile.large .libelle { font-size: 16px; }
.bas { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.bas .suivant { flex-grow: 1; width: auto; margin-top: 0; }
.compte { display: flex; align-items: baseline; gap: 5px; flex-shrink: 0; min-width: 74px; }
.compte b { font-family: var(--titre); font-weight: 800; font-size: 30px; line-height: 1; color: var(--ambre); }
.compte span { font-size: 14px; color: var(--gris); }
.erreur:not([hidden]) + .bas { margin-top: 0; }

/* Cartes de style : un dessin et un mot. */
.choix.carte { height: auto; justify-content: flex-start; align-items: stretch; gap: 14px; padding: 0 0 16px; overflow: hidden; }
.carte .dessin { display: block; width: 100%; height: auto; }
.carte .inconnu { display: flex; align-items: center; justify-content: center; aspect-ratio: 160 / 150; background: var(--creux); color: var(--gris-clair); }

/* « Votre projet ? » */
.bascule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; border-radius: 22px; background: var(--carte); border: 1px solid var(--bord); }
.bascule button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border: 0; border-radius: 16px; background: transparent; color: var(--creme); font-size: 18px; font-weight: 600; cursor: pointer; }
.bascule button[aria-pressed="true"] { background: var(--ambre); color: var(--encre); }
.panneau { display: flex; flex-direction: column; gap: 20px; }
.q[data-mode="surface"] [data-panneau="budget"], .q[data-mode="budget"] [data-panneau="surface"] { display: none; }
#ecran-projet { gap: 20px; }
.visuel { display: block; width: 100%; height: auto; flex-shrink: 0; border-radius: 22px; }
.barres { display: flex; align-items: flex-end; gap: 6px; height: 168px; padding: 20px 20px 0; background: var(--creux); overflow: hidden; }
.barres span { flex-grow: 1; border-radius: 6px 6px 0 0; background: var(--piste); }
.barres span.on { background: var(--ambre); }
.valeurs { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.valeurs > div { display: flex; flex-direction: column; gap: 2px; }
.valeurs > div.droite { align-items: flex-end; }
.valeurs > svg { margin-bottom: 4px; flex-shrink: 0; color: var(--fleche); }
.etiquette { font-size: 14px; font-weight: 500; color: var(--gris); }
.valeur { font-family: var(--titre); font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.valeur.petite { font-size: 30px; }
.valeur.haute { color: var(--ambre); }
.curseurs { position: relative; height: 44px; flex-shrink: 0; }
.piste, .rempli { position: absolute; top: 19px; height: 6px; border-radius: 3px; }
.piste { left: 0; right: 0; background: var(--piste); }
.rempli { background: var(--ambre); }
.rg { position: absolute; left: 0; top: 0; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rg::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.rg::-moz-range-track { height: 44px; background: transparent; }
.rg::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; box-sizing: border-box; width: 40px; height: 40px; margin-top: 2px; border-radius: 50%; background: var(--ambre); border: 4px solid var(--nuit); box-shadow: 0 0 0 2px var(--ambre); cursor: grab; }
.rg::-moz-range-thumb { pointer-events: auto; box-sizing: border-box; width: 40px; height: 40px; border-radius: 50%; background: var(--ambre); border: 4px solid var(--nuit); box-shadow: 0 0 0 2px var(--ambre); cursor: grab; }
.rg:focus-visible { outline: 2px solid var(--creme); outline-offset: 4px; border-radius: 22px; }

.erreur { margin: auto 0 -10px; padding: 10px 14px; border-radius: 14px; background: #3A1C1C; border: 1px solid #7A3434; color: var(--creme); font-size: 15px; line-height: 1.4; }
.suivant { margin-top: auto; }
.erreur:not([hidden]) + .suivant { margin-top: 0; }

/* --- AVR6 : ecran 6 « On garde votre idee » (maquette AVR3) --- */
.contact { position: relative; overflow: hidden; }
.contact-scene { position: absolute; top: 0; left: 0; width: 100%; height: auto; aspect-ratio: 390 / 330; pointer-events: none; }
.contact > .q-haut { position: relative; }
.contact-corps { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.contact .sur-titre.penche { font-size: 28px; transform: rotate(-3deg); transform-origin: left center; }
.champs { display: flex; flex-direction: column; gap: 10px; }
.champ { display: flex; align-items: center; gap: 14px; height: 62px; padding: 0 18px; border-radius: 18px; background: var(--carte); border: 2px solid var(--piste); }
.champ:focus-within { border-color: var(--ambre); }
.champ > svg { flex-shrink: 0; color: var(--ambre); }
.champ > div { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.champ label { font-size: 12px; font-weight: 500; color: var(--gris); }
.champ input { width: 100%; padding: 0; background: transparent; border: 0; outline: 0; color: var(--creme); font-family: inherit; font-size: 18px; font-weight: 600; }
.champ input::placeholder { color: var(--fleche); opacity: 1; }
/* Remplissage automatique du navigateur : garder les couleurs de l'ecran. */
.champ input:-webkit-autofill { -webkit-text-fill-color: var(--creme); -webkit-box-shadow: 0 0 0 40px var(--carte) inset; caret-color: var(--creme); }
.accord { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.35; color: var(--gris-clair); cursor: pointer; }
.accord input { width: 22px; height: 22px; flex-shrink: 0; margin: 0; accent-color: var(--ambre); }
.contact .erreur { margin: 0; }
.contact .mention { line-height: 1.4; }

/* --- AVR7 : acte « Montrer » — ecran 7 « Vos photos », ecran 8 « Vos plans » (maquette AVR3) --- */
.montrer .titre-montrer { font-size: 34px; line-height: 1.02; text-wrap: balance; }
.fichier { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.badge-ok { position: absolute; right: -6px; bottom: -6px; display: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #8FDDB0; border: 3px solid var(--carte); color: #0C2A1A; }

.btn-secondaire { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 18px; background: transparent; border: 2px solid #3A5175; color: var(--creme); font-size: 17px; font-weight: 600; cursor: pointer; }

/* AVR7b — une photo par ecran (maquette AVR7b). L'ecran tient dans la hauteur
   d'un navigateur de telephone (390 x 700) : c'est le dessin qui retrecit,
   jamais les boutons. */
.une-photo { height: 100vh; height: 100dvh; min-height: 540px; gap: 12px; padding-bottom: 14px; }
.une-photo > * { flex-shrink: 0; }
.une-photo > .vue { flex-shrink: 1; }
.points span.fait { background: #8FDDB0; }
.vue { position: relative; aspect-ratio: 350 / 270; min-height: 110px; border-radius: 24px; overflow: hidden; border: 2px solid var(--piste); background: var(--creux); }
.vue .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.vue .ou { position: absolute; right: 10px; bottom: 10px; width: 78px; height: 78px; border-radius: 16px; background: rgba(15, 27, 45, 0.92); border: 1px solid var(--bord); }
.vue .vignette { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; }
.vue .bon { position: absolute; left: 12px; bottom: 12px; display: none; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: rgba(15, 27, 45, 0.9); color: #8FDDB0; font-size: 15px; font-weight: 600; }
.bon-rond { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #8FDDB0; color: #0C2A1A; }
.vue .envoi { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(15, 27, 45, 0.75); color: var(--ambre); font-size: 16px; font-weight: 600; }
.une-photo[data-etat="fait"] .vue { border-color: #8FDDB0; }
.une-photo[data-etat="fait"] .scene, .une-photo[data-etat="fait"] .ou { display: none; }
.une-photo[data-etat="fait"] .vignette { display: block; }
.une-photo[data-etat="fait"] .bon, .une-photo[data-etat="envoi"] .envoi { display: flex; }
.pourquoi { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 500; line-height: 1.3; }
.pourquoi-rond { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--ambre-fonce); }
.pourquoi .question, .une-photo[data-etat="fait"] .pourquoi .a-faire { display: none; }
.une-photo[data-etat="fait"] .pourquoi .question { display: inline; }
.reperes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.repere { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 68px; padding: 6px 4px; border-radius: 16px; background: var(--carte); border: 1px solid var(--piste); font-size: 13px; font-weight: 600; line-height: 1.1; text-align: center; }
.une-photo[data-etat="fait"] .reperes { display: none; }
.une-photo .erreur { margin: 0; }
.photo-bas { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.une-photo .erreur:not([hidden]) + .photo-bas { margin-top: 0; }
.photo-bas .btn-secondaire { height: 54px; font-family: var(--titre); font-weight: 800; }
.une-photo .si-fait, .une-photo[data-etat="fait"] .si-vide { display: none; }
.une-photo[data-etat="fait"] .si-fait { display: flex; }
.une-photo[data-etat="envoi"] .photo-bas button { opacity: .5; pointer-events: none; }
.photo-liens { display: flex; justify-content: center; gap: 28px; }
.lien-discret { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px; background: none; border: 0; color: var(--gris); font-size: 15px; font-weight: 600; cursor: pointer; }
.lien-discret.passer { text-decoration: underline; text-underline-offset: 3px; }


.oui-non .choix { height: 132px; gap: 10px; }
.oui-non .choix .libelle { font-size: 20px; }
.plans-zone { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plans-grille { display: contents; }
.plan { display: flex; flex-direction: column; gap: 6px; }
.plan-visuel { position: relative; aspect-ratio: 1 / 1; }
.plan-visuel img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; background: #EFE9DC; }
.plan .badge-ok { display: flex; border-color: var(--nuit); }
.retirer { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 6px; border-radius: 12px; background: transparent; border: 1px solid #3A5175; color: var(--gris-clair); font-size: 14px; font-weight: 600; cursor: pointer; }
.retirer:disabled { opacity: .5; cursor: progress; }
.tuile-ajout { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1 / 1; padding: 0; border-radius: 20px; background: transparent; border: 2px dashed var(--fleche); color: var(--creme); font-size: 15px; font-weight: 600; cursor: pointer; }
.tuile-ajout.ambre { border-color: var(--ambre); }
.plans-ajout[aria-busy="true"] .tuile-ajout { opacity: .5; pointer-events: none; }
.plans-phrase { margin: 0; font-size: 15px; line-height: 1.45; color: var(--gris); }
.suivant-plans { margin-top: auto; }

/* « A tout a l'heure » : la scene de l'ecran 6, le texte en bas. */
.attente-sms { margin: 0; font-size: 17px; line-height: 1.4; color: var(--gris-clair); }

/* --- AVR8 : acte « Confier » — ecran 9 « Votre idee » (maquette AVR3) --- */
.idee { gap: 20px; }
.modifier { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; flex-shrink: 0; border-radius: 999px; background: transparent; border: 2px solid #3A5175; color: var(--creme); font-size: 15px; font-weight: 600; cursor: pointer; }
.idee-scene { display: block; width: 100%; height: auto; flex-shrink: 0; border-radius: 24px; }
.recap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recap-case { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 18px; background: var(--carte); }
.recap-case.large { grid-column: span 2; }
.recap-case > svg { flex-shrink: 0; }
.recap-case > div { display: flex; flex-direction: column; min-width: 0; }
.recap-libelle { font-size: 12px; color: var(--gris); }
.recap-valeur { font-size: 15px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.envoyer { margin-top: auto; }
.idee .erreur:not([hidden]) + .envoyer { margin-top: 0; }
/* Dossier envoye (« Revoir mon idee ») : lecture seule. */
.lecture .modifier, .lecture .envoyer, .lecture .erreur { display: none; }

/* --- AVR8 : ecran 10 « C'est parti » (maquette AVR3) --- */
.fin { position: relative; overflow: hidden; width: 100%; max-width: 430px; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.fin-scene { position: absolute; top: 0; left: 0; width: 100%; height: auto; aspect-ratio: 390 / 400; pointer-events: none; }
.fin .marque { position: absolute; top: 22px; left: 24px; }
.fin-corps { position: relative; display: flex; flex-direction: column; gap: 16px; }
.fin-titre { display: flex; flex-direction: column; gap: 4px; }
.fin h1 { margin: 0; font-family: var(--titre); font-weight: 800; font-size: 36px; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
.conseiller { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 24px; background: var(--carte); border: 1px solid var(--bord); }
.conseiller-rond { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; flex-shrink: 0; overflow: hidden; border-radius: 50%; background: var(--ambre-fonce); border: 2px solid var(--ambre); font-family: var(--titre); font-weight: 800; font-size: 20px; color: var(--ambre); }
/* Le logo du tenant (souvent sombre) sur une pastille claire, comme la marque. */
.conseiller-rond.logo { background: var(--creme); }
.conseiller-rond img { display: block; width: 44px; height: 44px; object-fit: contain; }
.conseiller > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.conseiller-nom { font-size: 19px; font-weight: 600; line-height: 1.2; }
.conseiller-role { font-size: 14px; color: var(--gris); }
.etats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.etats li { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 500; color: var(--gris-clair); }
.etat-rond { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; }
.etats .fait .etat-rond { background: #8FDDB0; color: #0C2A1A; }
.etats .encours { font-weight: 600; color: var(--creme); }
.etats .encours .etat-rond { background: var(--ambre); color: var(--encre); }
.etats .avenir .etat-rond { width: 32px; height: 32px; margin: 0 2px; border: 2px solid var(--fleche); color: var(--creme); }
.fin .btn-secondaire { height: 56px; }
/* AVR19 : « Mon espace », au-dessus de « Revoir mon idee ». */
.fin-espace { margin: 0; }
.fin-espace .btn-principal { height: 56px; }

/* --- AVR5d : « Trois gestes » (maquette AVR5d) : trois dessins relies par un fil
   qui arrive a la reponse, en bulles. Tient en 390 x 700. --- */
.gestes { gap: 0; }
.gestes .q-titre { margin-top: 12px; }
.fil { position: relative; margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.fil::before { content: ""; position: absolute; left: 7px; top: 52px; bottom: 34px; border-left: 3px dashed var(--ambre); opacity: .55; }
.fil-point { position: absolute; left: 0; top: 50%; width: 17px; height: 17px; margin-top: -8px; border-radius: 50%; background: var(--ambre); border: 4px solid var(--nuit); }
.geste { position: relative; display: flex; align-items: center; gap: 10px; height: 108px; padding-left: 28px; }
.geste-dessin { display: block; width: 132px; height: 104px; flex-shrink: 0; }
.geste-dit { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.geste-dit b { font-family: var(--titre); font-weight: 800; font-size: 22px; line-height: 1.05; letter-spacing: -0.015em; }
.etiquette-geste { padding: 3px 10px; border-radius: 999px; border: 1.5px solid rgba(255, 180, 84, .55); color: var(--ambre); font-size: 13.5px; font-weight: 600; }
.fil .reponse { position: relative; display: flex; align-items: flex-end; padding-left: 28px; margin-top: 2px; }
.fil .reponse .fil-point { top: auto; bottom: 26px; margin-top: 0; background: #8FDDB0; }
.bulles { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bulle { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: var(--creme); color: #14213A; font-size: 16px; font-weight: 600; line-height: 1.2; }
.bulle svg { flex-shrink: 0; color: #1E8A55; }
.bulle.b2 { border-radius: 6px 18px 18px 18px; }
.gestes .parti { margin-top: auto; }

/* --- AVR8c : « Autre chose à nous dire ? » (maquette AVR8c) : un mot, la photo
   d'un croquis. Tient en 390 x 700 sans défiler. --- */
.mot { gap: 16px; }
.ecrire { display: flex; gap: 12px; height: 138px; flex-shrink: 0; padding: 14px; border-radius: 22px; background: var(--carte); border: 2px solid var(--piste); cursor: text; }
.ecrire.actif, .ecrire:focus-within { border-color: var(--ambre); }
.ecrire-rond { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--ambre-fonce); }
.ecrire textarea { flex-grow: 1; min-width: 0; margin: 6px 0 0; padding: 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--creme); font: inherit; font-size: 17px; line-height: 1.35; }
.ecrire textarea::placeholder { color: #7F90AB; opacity: 1; }
.croquis { position: relative; display: flex; align-items: center; gap: 14px; flex-shrink: 0; padding: 12px; border-radius: 22px; background: var(--carte); border: 2px solid var(--piste); }
.croquis[data-etat="fait"] { border-color: #8FDDB0; }
.croquis-visuel { position: relative; width: 112px; height: 92px; flex-shrink: 0; }
.croquis-visuel .dessin { display: block; width: 100%; height: 100%; }
.croquis-visuel .vignette { display: none; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.croquis[data-etat="fait"] .dessin { display: none; }
.croquis[data-etat="fait"] .vignette { display: block; }
.croquis[data-etat="fait"] .badge-ok { display: flex; }
.croquis-cote { display: flex; flex-direction: column; gap: 9px; flex-grow: 1; min-width: 0; }
.croquis-titre { font-size: 18px; font-weight: 600; line-height: 1.15; }
.croquis-ok { margin-top: -5px; font-size: 14px; font-weight: 500; color: #8FDDB0; }
.croquis-envoi { display: none; font-size: 14px; font-weight: 500; color: var(--ambre); }
.croquis .si-fait, .croquis[data-etat="fait"] .si-vide { display: none; }
.croquis[data-etat="fait"] .si-fait { display: flex; }
.croquis[data-etat="envoi"] .croquis-envoi { display: block; }
.croquis[data-etat="envoi"] button { opacity: .5; pointer-events: none; }
.deux { display: flex; gap: 8px; }
.petit { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; height: 46px; padding: 0 6px; border-radius: 14px; background: transparent; border: 2px solid #3A5175; color: var(--creme); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.petit.plein { flex: 0 0 86px; background: var(--ambre); border-color: var(--ambre); color: var(--encre); }
.mot .erreur { margin: auto 0 0; }
.suivant-mot { margin-top: auto; }
.mot .erreur:not([hidden]) + .suivant-mot { margin-top: 0; }
/* Écran 9 : la case « Autre chose » (le mot) en trois lignes au plus. */
.recap-case[data-case="mot"] .recap-valeur { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Dans la colonne du croquis, « Retirer » garde sa hauteur (flex: 1 la reduirait a rien). */
.croquis-cote > .petit { flex: 0 0 auto; }
/* AVR8c : avec la case « Autre chose », l'ecran 9 tient en 390 x 700 sans defiler :
   c'est la scene qui retrecit (rognee par le haut), jamais les cases ni « Envoyer ». */
.idee { height: 100vh; height: 100dvh; min-height: 560px; }
.idee > * { flex-shrink: 0; }
.idee > .idee-scene { flex-shrink: 1; min-height: 80px; }
/* Les deux petits boutons du croquis tiennent dans le bloc en 390 px. */
.croquis { gap: 12px; }
.deux { gap: 6px; }
.deux .petit { gap: 5px; padding: 0 4px; }
.deux .petit.plein { flex-basis: 78px; }
