/* QG Pro -- formulaire public « Demander une demonstration », direction C « Focus » (choix du
   patron, 12 novembre 2026 ; maquette : client/prototypes/chrome/pages/public-demande.html?v=C).
   Gabarit : client/templates/lead_form_public.html (remplace celui de la base). Page publique
   autonome, toujours claire (comme dans la base) ; le panneau de marque est noir dans les deux
   ambiances (jetons du menu). Jetons --qgv-* seulement. Cette feuille est aussi chargee sur
   chaque page de l'app (modules maison) : tout est restreint a .mm-pd. */

body.mm-pd { margin: 0; min-height: 100vh; background: var(--qgv-canvas); color: var(--qgv-text); }
.mm-pd *, .mm-pd *::before, .mm-pd *::after { box-sizing: border-box; }
.mm-pd [hidden] { display: none !important; }
.mm-pd-page { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; min-height: 100vh; }
.mm-pd-page > * { min-width: 0; }

/* ---- Le panneau de marque (noir, jetons du menu) ---- */
.mm-pd-marque {
  min-height: 100vh;
  display: flex; flex-direction: column; gap: var(--qgv-s5);
  padding: clamp(24px, 4vw, 56px);
  background: var(--qgv-rail-bg); color: var(--qgv-rail-text); border-right: 1px solid var(--qgv-rail-line);
}
.mm-pd-logo {
  display: block; flex: none; height: 40px; aspect-ratio: 1308 / 331; max-width: 100%;
  /* Le fichier net, reduit d'avance a 40 px (le meme que la porte de connexion). */
  background: image-set(url(../../img/qgpro-logo-blanc-h40.png) 1x, url(../../img/qgpro-logo-blanc-h40@2x.png) 2x) left center / contain no-repeat;
}
.mm-pd-titre { margin-top: auto; display: grid; gap: var(--qgv-s4); }
.mm-pd-titre:last-child { margin-bottom: auto; }
.mm-pd-titre h1 {
  margin: 0; color: var(--qgv-rail-on-bg); font-family: var(--qgv-font-head);
  font-weight: var(--qgv-head-weight); letter-spacing: -.02em; font-size: clamp(30px, 3.5vw, 46px); line-height: 1.05;
}
.mm-pd-titre p { margin: 0; color: var(--qgv-rail-text); font-size: 15px; line-height: 1.5; max-width: 52ch; }
.mm-pd-ensuite { margin-bottom: auto; display: grid; gap: var(--qgv-s3); }
.mm-pd-sur {
  margin: 0; font-family: var(--qgv-font-mono); font-size: var(--qgv-t-xs); letter-spacing: .14em; text-transform: uppercase;
  color: var(--qgv-text-3);
}
.mm-pd-marque .mm-pd-sur { color: var(--qgv-rail-muted); }
.mm-pd-marque .mm-pd-suite { padding-top: var(--qgv-s4); border-top: 1px solid var(--qgv-rail-line); color: var(--qgv-rail-text); }
.mm-pd-marque .mm-pd-suite b { color: var(--qgv-rail-on-bg); }

/* « Ensuite » : trois temps numerotes */
.mm-pd-suite { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--qgv-s3); font-size: var(--qgv-t-sm); }
.mm-pd-suite li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.4; text-align: left; }
.mm-pd-suite b { display: block; font-weight: 600; color: var(--qgv-text); }
.mm-pd-num {
  flex: none; width: 26px; height: 26px; border-radius: var(--qgv-r-sm); display: grid; place-items: center;
  font-family: var(--qgv-font-mono); font-size: var(--qgv-t-xs); box-shadow: inset 0 0 0 1px currentColor; opacity: .8;
}

/* ---- Le cote du formulaire ---- */
.mm-pd-cote { display: flex; flex-direction: column; gap: var(--qgv-s5); padding: var(--qgv-s5) clamp(20px, 5vw, 72px) var(--qgv-s7); }
.mm-pd-haut { display: flex; justify-content: flex-end; }
.mm-pd-lang { display: inline-flex; padding: 3px; border-radius: var(--qgv-r-pill, 99px); box-shadow: inset 0 0 0 1px var(--qgv-line); }
.mm-pd-lang > * {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border-radius: var(--qgv-r-pill, 99px);
  font-size: var(--qgv-t-xs); font-weight: 600; color: var(--qgv-text-3); text-decoration: none;
  transition: color var(--qgv-dur-fast) var(--qgv-ease), background var(--qgv-dur) var(--qgv-ease);
}
.mm-pd-lang a:hover { color: var(--qgv-text); }
.mm-pd-lang [aria-current] { background: var(--qgv-text); color: var(--qgv-canvas); }

.mm-pd-form { width: 100%; max-width: 500px; margin: auto; }
.mm-pd-pas { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--qgv-s4); }
/* Sans script : les deux etapes l'une sous l'autre ; « Continuer » et les resumes n'existent pas. */
html:not(.mm-pd-js) .mm-pd-avec-script { display: none; }
html:not(.mm-pd-js) .mm-pd-pas + .mm-pd-pas { margin-top: var(--qgv-s6); padding-top: var(--qgv-s6); border-top: 1px solid var(--qgv-line); }

.mm-pd-progres { display: grid; gap: var(--qgv-s2); }
.mm-pd-avance { display: block; height: 3px; border-radius: 3px; background: var(--qgv-line); overflow: hidden; }
.mm-pd-avance i { display: block; height: 100%; width: var(--v, 50%); border-radius: inherit; background: var(--qgv-text); }
.mm-pd-h2 {
  margin: 0; font-family: var(--qgv-font-head); font-weight: var(--qgv-head-weight); color: var(--qgv-text);
  font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.015em; line-height: 1.1;
}

/* Champs */
.mm-pd-champ { display: grid; gap: 6px; min-width: 0; }
.mm-pd-champ > label, .mm-pd-label { font-size: var(--qgv-t-xs); font-weight: 600; color: var(--qgv-text-2); }
.mm-pd-champ small { font-weight: 500; color: var(--qgv-text-3); }
.mm-pd-champ input:not([type=radio]), .mm-pd-champ textarea, .mm-pd-champ select {
  width: 100%; min-height: 54px; padding: 12px 15px; font: inherit; font-size: 17px; color: var(--qgv-text);
  background: var(--qgv-surface); border: 1px solid var(--qgv-line); border-radius: var(--qgv-r);
  transition: border-color var(--qgv-dur-fast) var(--qgv-ease), box-shadow var(--qgv-dur-fast) var(--qgv-ease);
}
.mm-pd-champ textarea { min-height: 110px; line-height: 1.45; resize: vertical; }
.mm-pd-champ ::placeholder { color: var(--qgv-text-3); opacity: .8; }
.mm-pd-champ input:not([type=radio]):focus, .mm-pd-champ textarea:focus, .mm-pd-champ select:focus {
  outline: none; border-color: var(--qgv-text); box-shadow: 0 0 0 3px var(--qgv-line);
}
.mm-pd-champ.is-bad input:not([type=radio]) { border-color: var(--qgv-alert); box-shadow: 0 0 0 1px var(--qgv-alert); }
.mm-pd-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--qgv-s3); }
.mm-pd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Note « l'un des deux suffit » qui devient l'erreur ; erreurs */
.mm-pd-note, .mm-pd-err { margin: 0; display: flex; align-items: flex-start; gap: 7px; font-size: var(--qgv-t-xs); line-height: 1.45; }
.mm-pd-note { color: var(--qgv-text-3); }
.mm-pd-note.is-bad, .mm-pd-err { color: var(--qgv-alert); font-weight: 500; }
.mm-pd-note.is-bad::before, .mm-pd-err::before {
  content: "!"; flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--qgv-font-mono); font-size: 11px; font-weight: 600; background: var(--qgv-alert-wash);
}
.mm-pd-deux + .mm-pd-err, .mm-pd-err + .mm-pd-note, .mm-pd-deux + .mm-pd-note { margin-top: calc(-1 * var(--qgv-s2)); }

/* Tuiles (taille de l'equipe) */
.mm-pd-tuiles { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; }
.mm-pd-tuile { position: relative; display: block; }
.mm-pd-tuile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mm-pd-tuile span {
  display: grid; place-items: center; min-height: 54px; padding: 0 4px; border-radius: var(--qgv-r);
  background: var(--qgv-surface); box-shadow: inset 0 0 0 1px var(--qgv-line); color: var(--qgv-text-2);
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background var(--qgv-dur) var(--qgv-ease), color var(--qgv-dur-fast) var(--qgv-ease), box-shadow var(--qgv-dur-fast) var(--qgv-ease), transform var(--qgv-dur-fast) var(--qgv-ease);
}
.mm-pd-tuile:hover span { box-shadow: inset 0 0 0 1px var(--qgv-line-strong); color: var(--qgv-text); }
.mm-pd-tuile input:active + span { transform: scale(.96); }
.mm-pd-tuile input:checked + span { background: var(--qgv-text); color: var(--qgv-canvas); box-shadow: none; }
.mm-pd-tuile input:focus-visible + span { outline: 2px solid var(--qgv-accent); outline-offset: 2px; }

/* Le bouton et le pied */
.mm-pd-action { display: grid; gap: var(--qgv-s3); }
.mm-pd-envoi { width: 100%; min-height: 52px; justify-content: center; gap: 8px; font-size: 15px; border-radius: var(--qgv-r); }
.mm-pd-fleche { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--qgv-dur) var(--qgv-ease); }
.mm-pd-envoi:hover .mm-pd-fleche { transform: translateX(3px); }
.mm-pd-envoi.is-busy { pointer-events: none; opacity: .8; }
.mm-pd-legal { margin: 0; font-size: var(--qgv-t-xs); color: var(--qgv-text-3); line-height: 1.5; }

/* L'autre etape, repliee */
.mm-pd-replie {
  display: flex; align-items: center; gap: var(--qgv-s3); width: 100%; padding: 12px 14px; text-align: left; font: inherit;
  border: 0; border-radius: var(--qgv-r); background: transparent; box-shadow: inset 0 0 0 1px var(--qgv-line); color: var(--qgv-text-3);
}
button.mm-pd-replie { cursor: pointer; transition: box-shadow var(--qgv-dur-fast) var(--qgv-ease), color var(--qgv-dur-fast) var(--qgv-ease); }
button.mm-pd-replie:hover { box-shadow: inset 0 0 0 1px var(--qgv-line-strong); color: var(--qgv-text); }
.mm-pd-replie > div { flex: 1; min-width: 0; }
.mm-pd-replie b { display: block; font-size: var(--qgv-t-sm); font-weight: 600; color: var(--qgv-text-2); }
.mm-pd-replie-s { display: block; font-size: var(--qgv-t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-pd-replie em { flex: none; font-style: normal; font-size: var(--qgv-t-xs); font-weight: 600; }
.mm-pd-pastille {
  flex: none; min-width: 28px; height: 28px; border-radius: var(--qgv-r-sm); display: grid; place-items: center;
  background: var(--qgv-surface-2); color: var(--qgv-text-2); font-family: var(--qgv-font-mono); font-size: var(--qgv-t-xs); font-weight: 600;
}

/* Remerciement (et formulaire ferme) */
.mm-pd-merci { margin: auto; max-width: 460px; display: grid; justify-items: center; gap: var(--qgv-s2); text-align: center; padding: var(--qgv-s5) 0; }
.mm-pd-merci h2 { margin: var(--qgv-s2) 0 0; font-family: var(--qgv-font-head); font-weight: var(--qgv-head-weight); font-size: clamp(22px, 2.6vw, 28px); color: var(--qgv-text); }
.mm-pd-merci > p { margin: 0; color: var(--qgv-text-2); font-size: 15px; line-height: 1.5; max-width: 40ch; }
.mm-pd-merci .mm-pd-suite { margin-top: var(--qgv-s4); padding-top: var(--qgv-s4); border-top: 1px solid var(--qgv-line); color: var(--qgv-text-2); width: 100%; }
.mm-pd-coche { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--qgv-ok-wash); color: var(--qgv-ok); }
.mm-pd-coche svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 0; }

/* ---- Mouvements (0,6 s au plus ; coupes avec prefers-reduced-motion) ---- */
@media (prefers-reduced-motion: no-preference) {
  .mm-pd-titre, .mm-pd-ensuite, .mm-pd-logo { animation: mm-pd-monte .5s var(--qgv-ease) backwards; }
  .mm-pd-titre { animation-delay: .08s; }
  .mm-pd-ensuite { animation-delay: .16s; }
  .mm-pd-pas.is-ici > * { animation: mm-pd-monte .4s var(--qgv-ease) backwards; }
  .mm-pd-pas.is-ici > :nth-child(2) { animation-delay: .04s; }
  .mm-pd-pas.is-ici > :nth-child(3) { animation-delay: .08s; }
  .mm-pd-pas.is-ici > :nth-child(4) { animation-delay: .12s; }
  .mm-pd-pas.is-ici > :nth-child(5) { animation-delay: .16s; }
  .mm-pd-pas.is-ici > :nth-child(n+6) { animation-delay: .2s; }
  .mm-pd-avance i { transition: width .5s var(--qgv-ease); }
  .mm-pd-coche { animation: mm-pd-pop .5s var(--qgv-ease) backwards; }
  .mm-pd-coche svg { animation: mm-pd-trace .45s ease-out .25s backwards; }
  .mm-pd-merci > :not(.mm-pd-coche) { animation: mm-pd-monte .45s var(--qgv-ease) .2s backwards; }
}
@keyframes mm-pd-monte { from { opacity: 0; transform: translateY(10px); } }
@keyframes mm-pd-pop { from { opacity: 0; transform: scale(.5); } }
@keyframes mm-pd-trace { from { stroke-dashoffset: 30; } }

/* ---- Telephone : le panneau en haut, compact ; le bouton sous le pouce ---- */
@media (max-width: 760px) {
  .mm-pd-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mm-pd-marque { min-height: 0; padding: 18px 16px 20px; gap: var(--qgv-s3); border-right: 0; border-bottom: 1px solid var(--qgv-rail-line); }
  .mm-pd-logo { height: 26px; }
  .mm-pd-titre { margin-top: var(--qgv-s2); gap: var(--qgv-s2); }
  .mm-pd-titre h1 { font-size: 27px; }
  .mm-pd-titre p { font-size: var(--qgv-t-sm); }
  .mm-pd-marque .mm-pd-ensuite { display: none; }
  .mm-pd-cote { padding: 12px 16px 0; gap: var(--qgv-s3); }
  .mm-pd-lang > * { min-height: 44px; padding: 0 14px; }
  .mm-pd-form { margin: 0 auto; }
  .mm-pd-pas { gap: var(--qgv-s3); }
  .mm-pd-h2 { font-size: 23px; }
  .mm-pd-champ input:not([type=radio]), .mm-pd-champ select { min-height: 50px; font-size: 16px; }
  .mm-pd-champ textarea { font-size: 16px; }
  .mm-pd-champ ::placeholder { font-size: 15px; }
  .mm-pd-tuile span { min-height: 50px; font-size: var(--qgv-t-sm); }
  .mm-pd-action {
    position: sticky; bottom: 0; z-index: 1; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--qgv-canvas); border-top: 1px solid var(--qgv-line);
  }
  .mm-pd-action .mm-pd-legal { text-align: center; }
  .mm-pd-replie { margin-bottom: var(--qgv-s5); }
  .mm-pd-merci { padding-bottom: var(--qgv-s7); }
}
