/* La Boussole immobilière MTL : palette dans nexusco-reels/clients/La-Boussole/marque.json (validée le 2026-12-04) */
:root {
  --fonce: #123B36;
  --fonce-2: #1C4F48;
  --clair: #F6F3EC;
  --carte: #FFFFFF;
  --doux: #5E6B66;
  --ligne: #E3DDD0;
  --accent: #C08A3E;
  --accent-clair: #E9D3AE;
  --vert: #2F7D5B;
  --ambre: #B7791F;
  --rouge: #A8463A;
  --rayon: 16px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--clair); color: var(--fonce);
  font: 16px/1.5 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  transition: background .5s ease;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(32px, 8.6vw, 50px); line-height: 1.05; }
h2 { font-size: clamp(26px, 6.5vw, 36px); line-height: 1.12; }
h3 { font-size: 19px; margin: 28px 0 12px; }
[hidden] { display: none !important; }

/* ---------- Carte en fond (accueil) ---------- */
#carte, .voile { position: fixed; inset: 0; z-index: 0; transition: opacity .6s ease; }
#carte { filter: grayscale(1) contrast(1.3); opacity: 0; pointer-events: none; }
#carte.prete { opacity: 1; }
.voile { background: linear-gradient(180deg, rgba(18,59,54,.78) 0%, rgba(18,59,54,.84) 40%, rgba(18,59,54,.97) 100%); pointer-events: none; }
body:not(.mode-accueil) #carte, body:not(.mode-accueil) .voile { opacity: 0 !important; }
body.mode-accueil { background: var(--fonce); }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255,255,255,.5) !important; }

.entete, main, .pied { position: relative; z-index: 1; }
.entete { padding: 14px 16px 0; max-width: 560px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marque { display: flex; align-items: center; gap: 9px; font-family: "Fraunces", serif; font-weight: 600; font-size: 16px; transition: color .4s; }
.marque em { font-style: normal; opacity: .7; font-weight: 500; }
.logo { width: 28px; height: 28px; }
.aiguille { fill: var(--accent); }
.mode-accueil .marque { color: #fff; }
.retour-haut { order: 2; background: none; border: 0; color: var(--doux); font: 500 14px "Inter", sans-serif; padding: 8px 0; cursor: pointer; }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
.ecran.centre { text-align: center; padding-top: 34px; }

/* ---------- Accueil ---------- */
.accueil { color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); margin: 4px 0 16px; backdrop-filter: blur(6px); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,138,62,.7); } 50% { box-shadow: 0 0 0 7px rgba(192,138,62,0); } }
.brille { background: linear-gradient(100deg, var(--accent-clair) 20%, #fff 40%, var(--accent) 60%, var(--accent-clair) 80%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: brille 4s linear infinite; }
@keyframes brille { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.accueil .sous { color: rgba(255,255,255,.78); }
.accueil .puces li { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.accueil .puces li::before { color: var(--accent-clair); }
.verre { box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.accueil > * { animation: monte .7s var(--ease) both; }
.accueil > *:nth-child(2) { animation-delay: .08s; } .accueil > *:nth-child(3) { animation-delay: .16s; }
.accueil > *:nth-child(4) { animation-delay: .22s; } .accueil > *:nth-child(5) { animation-delay: .3s; }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.surtitre { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.sous { color: var(--doux); font-size: 17px; margin: 12px 0 0; }
.puces { list-style: none; padding: 0; margin: 14px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.puces li { font-size: 13px; font-weight: 500; padding: 5px 11px; border: 1px solid var(--ligne); border-radius: 999px; background: var(--carte); }
.puces li::before { content: "✓ "; color: var(--vert); }

/* ---------- Questions ---------- */
.carte-question { background: var(--carte); color: var(--fonce); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 20px 16px; box-shadow: 0 14px 34px -22px rgba(18,59,54,.45); }
.scene { position: relative; }
.entre-droite { animation: entreD .45s var(--ease) both; }
.entre-gauche { animation: entreG .45s var(--ease) both; }
@keyframes entreD { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes entreG { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
.carte-question > * { animation: monte .5s var(--ease) both; }
.carte-question > *:nth-child(2) { animation-delay: .04s; } .carte-question > *:nth-child(3) { animation-delay: .08s; }
.q-num { font-size: 12px; color: var(--doux); font-weight: 500; margin: 0 0 6px; }
.q-titre { font-family: "Fraunces", serif; font-size: 23px; font-weight: 600; line-height: 1.2; margin: 0 0 4px; }
.q-aide { color: var(--doux); font-size: 14px; margin: 0 0 16px; }
.choix { display: grid; gap: 10px; }
.choix.deux { grid-template-columns: 1fr 1fr; }
.choix button {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 15px 16px; border-radius: 12px;
  border: 1.5px solid var(--ligne); background: var(--clair); color: var(--fonce);
  font: 500 16px/1.3 "Inter", sans-serif; cursor: pointer; overflow: hidden;
  transition: border-color .2s, background .2s, transform .15s var(--ease), box-shadow .2s;
  animation: monte .45s var(--ease) both;
}
.choix button:nth-child(2) { animation-delay: .05s; } .choix button:nth-child(3) { animation-delay: .1s; }
.choix button:nth-child(4) { animation-delay: .15s; } .choix button:nth-child(5) { animation-delay: .2s; }
.choix button small { display: block; color: var(--doux); font-weight: 400; font-size: 13px; margin-top: 2px; }
.choix button .rond { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ligne); display: grid; place-items: center; transition: all .2s var(--ease); background: #fff; }
.choix button .rond::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .25s var(--ease); }
@media (hover: hover) { .choix button:hover { border-color: var(--accent); background: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(18,59,54,.4); } }
.choix button:active { transform: scale(.98); }
.choix button.choisi { border-color: var(--fonce); background: #fff; box-shadow: 0 0 0 3px rgba(18,59,54,.08); }
.choix button.choisi .rond { background: var(--fonce); border-color: var(--fonce); }
.choix button.choisi .rond::after { transform: scale(1); }
.choix.deux button { flex-direction: column; justify-content: center; text-align: center; padding: 22px 12px; font-size: 18px; font-weight: 600; }
.choix.deux button .rond { display: none; }
.vague { position: absolute; border-radius: 50%; background: rgba(192,138,62,.25); transform: scale(0); animation: vague .55s ease-out forwards; pointer-events: none; }
@keyframes vague { to { transform: scale(4); opacity: 0; } }

/* Curseur (années) */
.curseur-boite { background: var(--clair); border: 1px solid var(--ligne); border-radius: 14px; padding: 18px 16px 14px; }
.curseur-valeur { display: flex; align-items: baseline; justify-content: space-between; }
.curseur-valeur b { font-family: "Fraunces", serif; font-size: 54px; line-height: 1; font-weight: 600; transition: color .2s; }
.curseur-valeur span { color: var(--doux); font-weight: 500; }
.curseur-commentaire { min-height: 22px; font-size: 14px; color: var(--vert); font-weight: 500; margin: 8px 0 14px; transition: opacity .2s; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; outline: none;
  background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--ligne) var(--p, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--fonce); box-shadow: 0 4px 12px rgba(0,0,0,.2); cursor: grab; transition: transform .15s; }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--fonce); cursor: grab; }
.bornes { display: flex; justify-content: space-between; font-size: 12px; color: var(--doux); margin-top: 8px; }
.bouton-suivant { margin-top: 16px; }

/* Recherche (secteur) */
.recherche { position: relative; margin-bottom: 10px; }
.recherche input { width: 100%; padding: 14px 14px 14px 42px; font: 16px "Inter", sans-serif; color: var(--fonce); border: 1.5px solid var(--ligne); border-radius: 12px; background: var(--clair); }
.recherche input:focus { outline: none; border-color: var(--accent); background: #fff; }
.recherche svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--doux); }
.liste-villes { max-height: 320px; overflow-y: auto; display: grid; gap: 8px; padding: 2px; }
.liste-villes button { animation: none; }
.vide { color: var(--doux); font-size: 14px; padding: 8px 2px; }
.recu { text-align: center; padding: 22px 0 8px; }
.recu .coche { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: var(--vert); display: grid; place-items: center; animation: saute .5s var(--ease) both; }
.recu .coche svg { width: 28px; height: 28px; stroke: #fff; stroke-dasharray: 30; stroke-dashoffset: 30; animation: trace .4s .2s ease forwards; }
@keyframes saute { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes trace { to { stroke-dashoffset: 0; } }
.recu p { margin: 0; } .recu .grand { font-family: "Fraunces", serif; font-size: 24px; font-weight: 600; }
.recu .petit { color: var(--doux); font-size: 14px; margin-top: 4px; }

/* ---------- Progression + boussole vivante ---------- */
.progression { margin-bottom: 16px; }
.prog-ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prog-ligne > span { font-size: 13px; color: var(--doux); font-weight: 500; min-width: 64px; }
#prog-pct { text-align: right; color: var(--accent); font-weight: 600; }
.mini-boussole { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--doux); }
.mini-boussole svg { width: 30px; height: 30px; color: var(--fonce); }
#aiguille-vivante, #r-aiguille { transform-origin: 20px 20px; transition: transform .9s cubic-bezier(.34, 1.56, .64, 1); }
.barre { height: 6px; border-radius: 99px; background: var(--ligne); overflow: hidden; margin-top: 8px; }
.barre i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .6s var(--ease); }

/* ---------- Calcul ---------- */
.cadran { position: relative; width: 96px; height: 96px; margin: 0 auto 22px; color: var(--fonce); }
.cadran svg { position: relative; width: 100%; height: 100%; }
.onde { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: onde 2s ease-out infinite; }
.onde.o2 { animation-delay: 1s; }
@keyframes onde { from { transform: scale(1); opacity: .6; } to { transform: scale(1.9); opacity: 0; } }
.tourne { transform-origin: 20px 20px; animation: tourne 1.6s ease-in-out infinite; }
@keyframes tourne { 0% { transform: rotate(-50deg); } 50% { transform: rotate(60deg); } 100% { transform: rotate(-50deg); } }
.etapes-calcul { list-style: none; padding: 0; margin: 22px auto 0; max-width: 300px; text-align: left; }
.etapes-calcul li { padding: 8px 0 8px 32px; position: relative; color: var(--doux); opacity: .35; transition: opacity .35s, transform .35s var(--ease); transform: translateX(-6px); }
.etapes-calcul li::before { content: ""; position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ligne); transition: all .3s; }
.etapes-calcul li.fait { opacity: 1; color: var(--fonce); transform: none; }
.etapes-calcul li.fait::before { background: var(--vert); border-color: var(--vert); }
.etapes-calcul li.fait::after { content: "✓"; position: absolute; left: 5px; top: 8px; color: #fff; font-size: 12px; font-weight: 700; }

/* ---------- Verrou ---------- */
.score-flou, .carte-score { position: relative; background: var(--fonce); color: #fff; border-radius: var(--rayon); padding: 22px 20px; margin: 18px 0; overflow: hidden; }
.score-flou .score-chiffre span { filter: blur(10px); }
.cadenas { position: absolute; right: 18px; top: 18px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; animation: pulse-blanc 2s infinite; }
.cadenas svg { width: 20px; height: 20px; }
@keyframes pulse-blanc { 0%,100% { box-shadow: 0 0 0 0 rgba(233,211,174,.5); } 50% { box-shadow: 0 0 0 9px rgba(233,211,174,0); } }
.balaye { width: 60% !important; animation: balaye 2.4s ease-in-out infinite alternate; }
@keyframes balaye { from { width: 35% !important; } to { width: 82% !important; } }
.score-flou p, .carte-score .petit { color: rgba(255,255,255,.72); font-size: 14px; margin: 10px 0 0; }
.carte-score .petit:first-child { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.score-chiffre { display: flex; align-items: baseline; gap: 6px; font-family: "Fraunces", serif; }
.score-chiffre span { font-size: 72px; line-height: 1; font-weight: 600; }
.score-chiffre small { font-size: 22px; color: var(--accent-clair); }
.score-flou .barre, .carte-score .barre { background: rgba(255,255,255,.15); height: 8px; margin-top: 14px; }
.carte-score .barre i { transition: width 1.2s var(--ease); }
.score-haut { display: flex; align-items: center; justify-content: space-between; }
.grande-boussole { width: 78px; height: 78px; color: #fff; }

.formulaire { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 20px 16px; animation: monte .6s .15s var(--ease) both; }
.form-titre { font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.formulaire label { display: block; font-size: 13px; font-weight: 500; color: var(--doux); margin-bottom: 12px; }
.formulaire input { display: block; width: 100%; margin-top: 5px; padding: 13px 14px; font: 16px "Inter", sans-serif; color: var(--fonce); border: 1.5px solid var(--ligne); border-radius: 10px; background: var(--clair); transition: border-color .2s, background .2s, box-shadow .2s; }
.formulaire input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(192,138,62,.15); }
.formulaire input.ok { border-color: var(--vert); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; }
.bouton { position: relative; overflow: hidden; width: 100%; margin-top: 6px; padding: 16px; border: 0; border-radius: 12px; background: var(--fonce); color: #fff; font: 600 17px "Inter", sans-serif; cursor: pointer; box-shadow: 0 12px 26px -14px rgba(18,59,54,.8); transition: transform .15s, background .2s; }
.bouton::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-20deg); animation: reflet 3.2s ease-in-out infinite; }
@keyframes reflet { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.bouton:hover { background: var(--fonce-2); }
.bouton:active { transform: scale(.98); }
.bouton:disabled { opacity: .6; cursor: wait; }
.bouton.secondaire { width: auto; padding: 13px 22px; margin-top: 22px; }
.erreur { color: var(--rouge); font-size: 14px; margin: 10px 0 0; }
.consentement { font-size: 12px; color: var(--doux); margin: 12px 0 0; line-height: 1.45; }
.secoue { animation: secoue .4s; }
@keyframes secoue { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Résultat ---------- */
[data-ecran="resultat"] > * { animation: monte .6s var(--ease) both; }
[data-ecran="resultat"] > *:nth-child(2) { animation-delay: .08s; } [data-ecran="resultat"] > *:nth-child(3) { animation-delay: .14s; }
[data-ecran="resultat"] > *:nth-child(4) { animation-delay: .2s; }
.pastille { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; }
.pastille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pastille.favorable { color: var(--vert); background: #E4F1EA; }
.pastille.moyen { color: var(--ambre); background: #F7ECD9; }
.pastille.attendre { color: var(--rouge); background: #F5E3E0; }
.carte-score .barre i.favorable { background: #6FC49B; }
.carte-score .barre i.moyen { background: var(--accent); }
.carte-score .barre i.attendre { background: #D98C80; }
.facteurs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.facteurs li { display: flex; gap: 12px; align-items: flex-start; background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px; padding: 12px 14px; font-size: 15px; opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.facteurs li.vu { opacity: 1; transform: none; }
.facteurs b { flex: none; min-width: 42px; text-align: center; font-size: 14px; padding: 2px 6px; border-radius: 8px; }
.facteurs .plus b { color: var(--vert); background: #E4F1EA; }
.facteurs .moins b { color: var(--rouge); background: #F5E3E0; }
.suite { margin-top: 8px; }
.suite > p { margin: 0 0 12px; color: var(--doux); }
.prochaines { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 8px; }
.prochaines li { counter-increment: n; position: relative; background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px; padding: 12px 14px 12px 52px; font-size: 15px; }
.prochaines li::before { content: counter(n); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--fonce); color: #fff; font: 600 13px/26px "Inter", sans-serif; text-align: center; }
.note { font-size: 12px; color: var(--doux); margin: 22px 0 0; }

.pied { text-align: center; font-size: 12px; color: var(--doux); padding: 18px 16px 26px; }
.mode-accueil .pied { color: rgba(255,255,255,.5); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .facteurs li { opacity: 1; transform: none; } }
