/* =====================================================================
   Agentique Québec — Choisir mon forfait (FR /choisir-mon-forfait, EN /en/choose-your-plan) : « logigramme »
   Le questionnaire est un arbre de décision dessiné sur le papier : chaque question est un losange (Q1 à Q5),
   ses quatre réponses sont les voies A à D (les mêmes lettres que les choix de la carte), et la voie choisie se
   trace en cyan jusqu'à la question suivante. Après Q5, le calcul des points (Σ) mène à l'une des quatre bornes
   (DIA, ESS, PRO, TRA, de la moins à la plus engageante) : le résultat arrive au bout du chemin, la lampe L-1
   du schéma latéral s'allume. La carte du questionnaire et celle du résultat sont en verre marine.
   Chargée après /assets/premium/aq-premium.css. Comportements : scripts d'origine de la page + forfait.js.
   ===================================================================== */

/* ---------- Héro : la cour de matériaux, plus bas que celui de l'accueil pour que le questionnaire arrive vite ---------- */
.forfait-entete .aq-entete-cadre { min-height: clamp(320px, 42svh, 420px); }
.forfait-entete .aq-entete-photo img { object-position: 60% 62%; }
.forfait-entete .aq-entete-panneau { max-width: min(700px, 100%); }
.forfait-entete h1 { font-size: clamp(2.3rem, 3.7vw, 3.35rem); }
.forfait-entete .aq-entete-texte { max-width: 54ch; }

/* ---------- Le poste : logigramme à gauche, carte à droite ----------
   18 octobre : le logigramme passe tout à gauche (le poste prend la largeur des photos pleine largeur) et la carte,
   plus grande, est centrée dans la page sur grand écran (colonne vide symétrique à droite). */
.quiz > .container { max-width: none; padding-inline: var(--inset); }
.quiz-poste {
  position: relative;
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(36px, 4vw, 72px); align-items: start;
}
.quiz-pile { width: 100%; max-width: 1000px; justify-self: center; }
@media (min-width: 1600px) { .quiz-poste { grid-template-columns: 340px minmax(0, 1fr) 340px; } }
html:not(.js) .quiz-poste { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .logigramme, html:not(.js) .lg-lien { display: none; }
.logigramme { position: relative; padding-top: 4px; }
.quiz-pile { position: relative; min-width: 0; container-type: inline-size; }
.quiz-noscript { padding: 22px 24px; border-radius: 22px; background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1px rgba(10, 22, 40, .08), var(--ombre-1); color: var(--ardoise-700); }
.quiz-noscript a { color: var(--cyan-750); font-weight: 700; }

/* ---------- Le logigramme (SVG décoratif, état posé par forfait.js) ---------- */
.lg { --encre: rgba(10, 22, 40, .66); --encre-faible: rgba(10, 22, 40, .3); --signal: #00b4d8; --signal-vif: #00d4ff; display: block; width: 100%; height: auto; overflow: visible; }
.lg-h { display: none; }
.lg text { font-family: var(--font-text); font-variant-numeric: tabular-nums; }
.lg .lg-voie { fill: none; stroke: var(--encre-faible); stroke-width: 1.1; stroke-dasharray: 3 4; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s var(--ease-std), stroke-width .25s var(--ease-std); }
.lg .lg-trace { fill: none; stroke: var(--signal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s cubic-bezier(.65, 0, .35, 1); }
.lg .lg-trace--fixe, .lg .fait > .lg-trace, .lg .lg-route.fait > .lg-trace { stroke-dashoffset: 0; }
.lg .lg-route.fait > .lg-voie { stroke: transparent; }
.lg .lg-route.candidat > .lg-voie { stroke: var(--encre); }
.lg .lg-route.choisi > .lg-voie, .lg .lg-route.survol > .lg-voie { stroke: var(--signal); stroke-dasharray: none; stroke-width: 1.7; }
.lg .lg-borne { fill: var(--fond); stroke: var(--encre-faible); stroke-width: 1.1; transition: fill .25s, stroke .25s; }
.lg .lg-route.candidat .lg-borne { stroke: var(--encre); }
.lg .lg-route.fait .lg-borne, .lg .lg-route.choisi .lg-borne, .lg .lg-route.survol .lg-borne { fill: var(--signal); stroke: var(--signal); }
.lg .lg-lettre { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; fill: rgba(10, 22, 40, .34); transition: fill .25s; }
.lg .lg-route.candidat .lg-lettre { fill: rgba(10, 22, 40, .78); }
.lg .lg-route.fait .lg-lettre, .lg .lg-route.choisi .lg-lettre, .lg .lg-route.survol .lg-lettre { fill: #006f8b; }
.lg .lg-losange { fill: #fbfaf7; stroke: var(--encre-faible); stroke-width: 1.3; transition: fill .3s, stroke .3s; }
.lg .lg-code { font-size: 9.5px; font-weight: 750; letter-spacing: .05em; fill: rgba(10, 22, 40, .48); transition: fill .3s; }
.lg .lg-question.actif .lg-losange { fill: #fff; stroke: var(--signal); stroke-width: 2; }
.lg .lg-question.actif > .lg-code { fill: #006f8b; }
.lg .lg-question.fait .lg-losange { fill: var(--marine-900); stroke: var(--marine-900); }
.lg .lg-question.fait > .lg-code { fill: #fff; }
.lg .lg-halo { fill: none; stroke: var(--signal); stroke-width: 1.3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.lg .lg-question.actif .lg-halo { animation: lg-pouls 2.4s var(--ease-std) infinite; }
@keyframes lg-pouls { 0% { opacity: .6; transform: scale(.72); } 70% { opacity: 0; transform: scale(1.12); } 100% { opacity: 0; transform: scale(1.12); } }
.lg .lg-depart { fill: var(--marine-900); }
.lg .lg-boite { fill: #fbfaf7; stroke: var(--encre-faible); stroke-width: 1.3; transition: fill .3s, stroke .3s; }
.lg .lg-code--sigma { font-size: 13px; font-weight: 600; }
.lg .lg-calcul.fait .lg-boite { fill: var(--marine-900); stroke: var(--marine-900); }
.lg .lg-calcul.fait .lg-code { fill: #fff; }
.lg .lg-terminal { fill: #fbfaf7; stroke: var(--encre-faible); stroke-width: 1.3; transition: fill .3s, stroke .3s; }
.lg .lg-coeur { fill: transparent; transition: fill .3s; }
.lg .lg-sortie.gagnant .lg-terminal { fill: #fff; stroke: var(--signal); stroke-width: 2.2; }
.lg .lg-sortie.gagnant .lg-coeur { fill: var(--signal-vif); filter: drop-shadow(0 0 4px rgba(0, 212, 255, .9)); }
.lg .lg-sortie.gagnant .lg-code { fill: #006f8b; font-weight: 850; }
.lg .lg-sortie.alt > .lg-voie { stroke: var(--signal); stroke-dasharray: 2 3; }
.lg .lg-sortie.alt .lg-terminal { stroke: var(--signal); stroke-dasharray: 2.5 2.5; }
.lg .lg-sortie.alt .lg-code { fill: #006f8b; }
.lg .lg-choisie { font-size: 10px; font-weight: 800; fill: #006f8b; }
.lg-h .lg-code--s { font-size: 8.5px; }

/* Le dernier tronçon : de la borne gagnante jusque dans la carte du résultat (il passe en blanc dans le verre) */
.lg-lien { position: absolute; z-index: 2; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; transition: opacity .2s; }
.lg-lien.visible { opacity: 1; }
.lg-lien path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.lg-lien.visible path { stroke-dashoffset: 0; transition: stroke-dashoffset .8s cubic-bezier(.65, 0, .35, 1) .55s; }
.lg-lien.visible .lg-lien-dedans { transition-delay: 1.3s; transition-duration: .3s; }
.lg-lien-papier { stroke: var(--cyan-500); }
.lg-lien-dedans { stroke: #fff; }
.lg-lien-borne { fill: var(--cyan-400); opacity: 0; transition: opacity .2s 1.55s; }
.lg-lien.visible .lg-lien-borne { opacity: 1; }

/* ---------- La carte du questionnaire ---------- */
.quiz-card { padding: clamp(26px, 3.6vw, 58px); border-radius: 34px; }
.quiz-card[hidden] { display: none; }
.quiz-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 44px; margin: -8px 0 10px;
  font-size: .86rem; font-weight: 650; color: var(--panneau-texte-2);
}
#quiz-count { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.quiz-back { min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--panneau-accent); font: inherit; font-weight: 650; cursor: pointer; }
.quiz-back:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.quiz-back[hidden] { display: none; }
/* Progression : cinq segments, comme les cinq losanges */
.quiz-bar { position: relative; height: 6px; margin-bottom: 30px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.quiz-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 4px), #0b1d33 calc(20% - 4px) 20%); pointer-events: none; }
.quiz-bar span { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan-500), var(--cyan-400)); transition: width .5s var(--ease-sortie); }
.quiz-card .quiz-q { font-size: clamp(1.55rem, 1.05rem + 1.5vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.18; outline: none; text-wrap: balance; }
.calque .quiz-hint { margin-top: 12px; font-size: 1.04rem; color: var(--panneau-texte-2); }
.quiz-hint[hidden] { display: none; }
/* Choix : lettre A à D (compteur décoratif, sans texte ajouté) dans un petit losange, comme les voies du logigramme */
.quiz-choices { counter-reset: choix; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
@container (max-width: 520px) { .quiz-choices { grid-template-columns: minmax(0, 1fr); } }
.quiz-choice {
  counter-increment: choix;
  position: relative; display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 86px; margin: 0; padding: 16px 22px 16px 18px;
  border: 0; border-radius: 20px; cursor: pointer;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  color: #fff; font: 600 1.08rem/1.38 var(--font-text); letter-spacing: -.005em; text-align: left;
  transition: background-color .2s var(--ease-std), box-shadow .2s var(--ease-std);
  -webkit-tap-highlight-color: transparent;
}
.quiz-choice::before {
  content: counter(choix, upper-alpha);
  content: counter(choix, upper-alpha) / "";
  flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  font-size: .78rem; font-weight: 800; line-height: 1; color: var(--panneau-accent);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M17 1.6L32.4 17L17 32.4L1.6 17Z' fill='%230c1d35' stroke='%2300d4ff' stroke-opacity='.65' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: color .2s;
}
.quiz-choice:hover { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(0, 212, 255, .65); }
.quiz-choice:focus-visible { outline: 3px solid var(--cyan-400); outline-offset: 2px; }
.quiz-choice[aria-pressed="true"] { background: rgba(0, 212, 255, .16); box-shadow: inset 0 0 0 1.6px var(--cyan-400), 0 0 26px -10px rgba(0, 212, 255, .8); }
.quiz-choice[aria-pressed="true"]::before {
  color: var(--marine-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M17 1.6L32.4 17L17 32.4L1.6 17Z' fill='%2300d4ff' stroke='%2300d4ff' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* ---------- Le résultat ---------- */
.quiz-result .eyebrow { margin-bottom: 16px; color: var(--panneau-puce-texte); background: var(--panneau-puce-fond); border-color: var(--panneau-puce-bord); }
.quiz-card .result-name { font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.1rem); font-weight: 850; letter-spacing: -.035em; line-height: 1.04; outline: none; }
.calque .result-price { margin: 12px 0 18px; font-size: 1.12rem; font-weight: 750; line-height: 1.4; color: var(--panneau-accent); }
.calque .result-why { max-width: 62ch; font-size: 1.02rem; line-height: 1.68; color: var(--panneau-texte); }
.result-list { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 12px; }
.calque .result-list li { position: relative; padding-left: 33px; font-size: .98rem; line-height: 1.5; color: var(--panneau-texte); }
.result-list li::before { content: ""; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; background: var(--panneau-icone-fond); box-shadow: inset 0 0 0 1px var(--panneau-puce-bord); }
.result-list li::after {
  content: ""; position: absolute; left: 5px; top: 6px; width: 11px; height: 11px; background: var(--panneau-icone);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4l2.4 2.4L10 3.2' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4l2.4 2.4L10 3.2' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.calque .result-more { margin-bottom: 18px; line-height: 1.5; }
.calque .result-more a { color: var(--panneau-accent); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.calque .result-more a:hover { color: #fff; }
.calque .result-link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--panneau-accent); font-weight: 700; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left calc(100% - 9px) / 100% 1.5px no-repeat;
  transition: background-size var(--t-moyen) var(--ease-sortie), color var(--t-moyen);
}
.calque .result-link:hover { color: #fff; background-size: 40% 1.5px; }
.calque .result-alt { margin: 0 0 20px; padding: 12px 16px; border-left: 3px solid var(--cyan-400); border-radius: 0 14px 14px 0; background: rgba(0, 212, 255, .09); font-size: .96rem; color: var(--panneau-texte); }
.result-alt[hidden] { display: none; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 6px; }
.result-restart { min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: 600 .94rem/1.2 var(--font-text); color: var(--panneau-texte-2); text-decoration: underline; text-underline-offset: 3px; }
.result-restart:hover { color: #fff; }
.calque .result-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--panneau-filet); font-size: .84rem; line-height: 1.6; color: var(--panneau-texte-2); }

/* ---------- Schéma latéral : la lampe L-1 attend le résultat ---------- */
.quiz:not(.a-resultat) > .charge .halo { opacity: 0; }
.quiz:not(.a-resultat) > .charge .lampe { fill: rgba(0, 212, 255, 0); }
.quiz.a-resultat > .charge .halo { opacity: 1; }
.quiz.a-resultat > .charge .lampe { fill: rgba(0, 212, 255, .28); }
.quiz.est-alimentee .calque { box-shadow: var(--panneau-ombre); }
.quiz.a-resultat .quiz-result.calque { box-shadow: var(--panneau-ombre), 0 0 0 1px var(--panneau-allume), 0 0 40px -12px var(--panneau-allume); }

/* ---------- Pied de page court (liens de la barre) ---------- */
.pied-court { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1fr); }
.footer-col.pied-action { align-items: flex-start; }
.footer-col.pied-action a.btn { min-height: 48px; padding: 0 22px; font-size: .92rem; color: var(--marine-900); text-decoration: none; }
.footer-col.pied-action a.btn:hover { color: var(--marine-900); text-decoration: none; }

/* ---------- Sélecteur de langue de production (libellé et lien plutôt que boutons) ---------- */
a.lang-btn, span.lang-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
span.lang-btn { cursor: default; }

/* ---------- Adaptatif : le logigramme passe en bandeau au-dessus de la carte ---------- */
@media (max-width: 1023px) {
  .quiz-poste { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .lg-v { display: none; }
  .lg-h { display: block; max-width: 540px; }
  .logigramme { padding: 0 0 2px; }
  .pied-court { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .forfait-entete .aq-entete-cadre { min-height: clamp(450px, 60svh, 540px); align-items: flex-start; }
  .forfait-entete .aq-entete-photo img { object-position: 50% 50%; }
  .quiz-card { padding: 22px 18px 24px; border-radius: 26px; }
  .quiz-choices { gap: 10px; margin-top: 22px; }
  .quiz-choice { min-height: 64px; padding: 12px 14px; gap: 14px; font-size: .98rem; }
  .result-actions .btn { width: 100%; }
  .footer-col.pied-action { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .lg .lg-question.actif .lg-halo { animation: none; opacity: .5; transform: none; }
}
