/* PMSH — questionnaires de préconsultation (MAPA, accompagnement minceur).
 * Règles de base, composants dans l'ordre des étapes, transitions entre étapes,
 * puis un bloc @media par point de rupture et le mouvement réduit.
 * Polices : polices système uniquement (aucune ressource externe). */

/* Base */
:root {
  /* Palette unique du site (mêmes valeurs dans assets/site.css) :
     bleu d'action, marine, trois fonds pâles, deux gris de texte, une bordure.
     Vert : seulement le point « Ouvert » de la pastille et le trait des surtitres.
     Rouge : seulement les erreurs. */
  --pmsh-bleu: #004580;
  --pmsh-marine: #062f57;
  --pmsh-pale-1: #f6f9fc;
  --pmsh-pale-2: #edf3f8;
  --pmsh-pale-3: #dce8f2;
  --pmsh-gris-1: #365268;
  --pmsh-gris-2: #5b7184;
  --pmsh-bord: #dbe5ee;
  --pmsh-vert: #8EC300;
  --pmsh-rouge: #B42318;
  --navy: var(--pmsh-bleu);
  --deep: var(--pmsh-marine);
  --ink: var(--pmsh-marine);
  --grey: var(--pmsh-gris-1);
  --soft: var(--pmsh-gris-2);
  --line: var(--pmsh-bord);
  --line2: var(--pmsh-bord);
  --bg: var(--pmsh-pale-1);
  --card: #fff;
  --navy-bg: var(--pmsh-pale-2);
  --red: var(--pmsh-rouge);
  --field-h: 42px;
  --shadow: 0 16px 58px rgba(6,47,87,.10),0 2px 6px rgba(6,47,87,.05);
  --ease: cubic-bezier(.22,1,.36,1);
  --motion-expand: .46s;
  --motion-ease: cubic-bezier(.22,1,.36,1);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.5 "IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  min-height: 100vh;
}
button {
  font: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: .53;
}
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
button:focus-visible {
  outline-offset: 3px;
}
input.text-input,
select.text-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: var(--field-h);
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  box-shadow: none;
  outline: none;
  transition: border .18s,box-shadow .18s;
}
textarea.text-input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  box-shadow: none;
  outline: none;
  transition: border .18s,box-shadow .18s;
  height: 73px;
  min-height: 70px;
  resize: vertical;
  line-height: 1.45;
}
input.text-input:focus,
select.text-input:focus,
textarea.text-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0,69,128,.25);
}
.mt-8 {
  margin-top: 8px;
}
.mt-13 {
  margin-top: 13px;
}
.mt-17 {
  margin-top: 17px;
}

/* Cadre, en-tête, pied et transitions entre étapes */
.page-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg,var(--deep) 0,var(--deep) 25%,var(--bg) 25%,var(--bg) 100%);
}
.page-shell::before {
  content: "";
  position: absolute;
  top: -380px;
  left: 50%;
  width: 900px;
  height: 540px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse,rgba(255,255,255,.07),transparent 67%);
  pointer-events: none;
}
.page-shell::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 25%;
  width: min(760px,85vw);
  height: 1px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 18px 16px;
  gap: 13px;
}
.dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: none;
  width: min(var(--target-width),100%);
  max-height: calc(100dvh - 66px);
  background: var(--card);
  border: 1px solid var(--pmsh-bord);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: width .42s var(--ease),height .42s var(--ease),transform .42s var(--ease),box-shadow .3s ease;
}
.dialog[data-stage="1"] {
  --target-width: 470px;
}
.dialog[data-stage="2"] {
  --target-width: 720px;
}
.dialog[data-stage="3"] {
  --target-width: 850px;
}
.dialog[data-stage="4"] {
  --target-width: 770px;
}
.dialog.is-morphing {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px rgba(6,47,87,.14),0 2px 6px rgba(6,47,87,.05);
  will-change: width,height,transform;
}
.dialog__head {
  flex: 0 0 auto;
  text-align: center;
  padding: 23px 35px 10px;
  position: relative;
}
.brand {
  display: block;
  margin: 0 auto 16px;
  width: 160px;
  height: 65px;
  object-fit: contain;
}
.brand-tag {
  color: var(--pmsh-bleu);
  font-size: 10px;
  letter-spacing: .21em;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.headline {
  margin: 0;
  color: var(--deep);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 700;
}
.head-subtitle {
  color: var(--soft);
  font-size: 12.5px;
  max-width: 610px;
  margin: 7px auto 0;
}
.progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 16px auto 0;
  height: 5px;
}
.progress__dash {
  width: 29px;
  height: 4px;
  background: var(--pmsh-bord);
  border-radius: 20px;
  transition: background .2s,width .25s;
}
.progress__dash.done {
  background: rgba(0,69,128,.4);
}
.progress__dash.current {
  background: var(--navy);
  width: 40px;
}
.dialog__body {
  min-height: 0;
  flex: 0 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 29px 12px;
  scrollbar-color: var(--pmsh-bord) transparent;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}
.dialog__body::-webkit-scrollbar {
  width: 6px;
}
.dialog__body::-webkit-scrollbar-thumb {
  background: var(--pmsh-bord);
  border-radius: 12px;
}
.dialog__footer {
  flex: 0 0 auto;
  padding: 13px 29px 21px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.footer-controls.one .btn {
  width: 100%;
}
.footer-controls:not(.one) .btn {
  flex: 1;
  min-width: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
  transition: background .18s,border-color .18s,transform .18s;
  text-decoration: none;
}
.btn:hover:not(:disabled) {
  background: var(--deep);
  border-color: var(--deep);
}
.btn.secondary {
  background: #fff;
  border-color: var(--line2);
  color: var(--navy);
}
.btn.secondary:hover:not(:disabled) {
  background: var(--navy-bg);
  border-color: var(--navy);
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.demo-caption {
  font-size: 11.5px;
  color: var(--pmsh-gris-2);
  text-align: center;
  letter-spacing: .012em;
  text-wrap: balance;
  max-width: 560px;
  margin: 0;
}
.stage-content {
  animation: fade-enter .30s var(--ease) both;
}
.dialog.is-switching > .dialog__body,
.dialog.is-switching > .dialog__footer,
.dialog.is-switching > .dialog__head {
  opacity: 0;
  pointer-events: none;
}
.dialog.is-switching.is-revealing > .dialog__body,
.dialog.is-switching.is-revealing > .dialog__footer,
.dialog.is-switching.is-revealing > .dialog__head {
  opacity: 1;
  transition: opacity .31s ease;
}
.transition-ghost {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  background: #fff;
  border-radius: inherit;
  transition: opacity .31s ease;
}
.transition-ghost .stage-content {
  animation: none !important;
}
.dialog.is-revealing > .transition-ghost {
  opacity: 0;
}
.dialog.is-switching .stage-content {
  animation: none !important;
}

/* Champs et choix */
.kicker {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--pmsh-bleu);
  margin: 0 0 13px;
  font-weight: 700;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px 14px;
}
.form-grid.tight {
  gap: 11px 13px;
}
.field {
  display: block;
  min-width: 0;
}
.field-label {
  display: block;
  color: var(--grey);
  font-size: 12px;
  letter-spacing: .012em;
  margin: 0 0 5px;
}
.req {
  color: var(--pmsh-rouge);
  font-weight: 700;
}
.text-input:disabled {
  color: var(--soft);
  background: var(--pmsh-pale-1);
}
.text-input.is-invalid {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 2px rgba(180,35,24,.12) !important;
}
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  margin-top: -5px;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--grey);
  border-bottom: 1.6px solid var(--grey);
  transform: rotate(45deg);
  pointer-events: none;
}
.select-wrap .text-input {
  padding-right: 32px;
}
.error-banner {
  background: rgba(180,35,24,.06);
  color: var(--pmsh-rouge);
  border: 1px solid rgba(180,35,24,.3);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 1px 0 11px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--deep);
  margin: 0;
}
.section-heading small {
  color: var(--soft);
  font-size: 11px;
}
.section-heading:not(:first-child) {
  margin-top: 21px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 19px 0;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line2);
  color: var(--grey);
  background: #fff;
  border-radius: 7px;
  min-height: 37px;
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1.2;
  transition: background .18s,border-color .18s,color .18s;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.choice.selected {
  background: var(--navy-bg);
  color: var(--deep);
  border-color: var(--pmsh-bleu);
  font-weight: 600;
}
.choice:focus-within {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.choice .check-icon {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--pmsh-gris-2);
  font-size: 10px;
  color: transparent;
}
.choice .check-icon svg {
  width: 10px;
  height: 10px;
}
.choice.selected .check-icon {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.check-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--grey);
  line-height: 1.5;
  cursor: pointer;
}
.check-line input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--navy);
}
.callout {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  gap: 9px;
  align-items: start;
  color: var(--deep);
  margin-top: 12px;
}
.callout svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}
.callout.danger {
  background: rgba(180,35,24,.06);
  border: 1px solid rgba(180,35,24,.3);
  color: var(--pmsh-rouge);
}
.callout.subtle {
  background: var(--pmsh-pale-1);
  border: 1px solid var(--line);
}
.step-intro {
  color: var(--grey);
  font-size: 13px;
  line-height: 1.55;
  margin: 1px 0 17px;
}
.q .choice-row {
  gap: 6px;
}
.q .choice {
  min-height: 34px;
  font-size: 11.5px;
  padding: 6px 9px;
}
.q .choice .check-icon {
  width: 13px;
  height: 13px;
}
.num-card .field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--deep);
}
.num-card-row .text-input {
  min-width: 0;
  flex: 1;
}
.num-card-row select.text-input {
  max-width: 115px;
  padding-right: 20px;
}
.num-card .check-line {
  margin: 9px 0 0;
  font-size: 11.5px;
}
.num-card .text-input {
  min-height: 39px;
}
.preflight .check-line {
  font-size: 12px;
}
.discreet {
  color: var(--soft);
  font-size: 11px;
}
.conditional-field {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--motion-expand) var(--motion-ease),opacity .32s ease,margin var(--motion-expand) var(--motion-ease);
}
.conditional-field.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
}
.conditional-field .reveal-inner {
  min-width: 0;
}
.conditional-field.is-visible .reveal-inner {
  animation: content-appear .32s ease-out both;
}
.reveal-field {
  margin: 0;
}
.reveal-field.is-visible {
  margin-top: 10px;
}
.urgent-reveal .callout {
  margin-top: 12px;
}
.preflight .check-line input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1.5px solid var(--pmsh-gris-2);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: inline-block;
  margin: 1px 0 0;
  transition: background-color .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.preflight .check-line input[type="checkbox"]:checked {
  background-color: var(--navy);
  border-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9l3.3 3.5L14 5.5' stroke='%23ffffff' fill='none' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.preflight .check-line input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* Questionnaire (rubriques, questions, mesures) */
.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.metric-row span {
  font-size: 12px;
  color: var(--grey);
}
.metric-bar {
  height: 5px;
  background: var(--pmsh-pale-2);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 18px;
}
.metric-bar i {
  height: 100%;
  display: block;
  background: var(--navy);
  width: 0;
  transition: width .2s;
}
.group {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 9px;
  overflow: hidden;
  transition: border .18s;
}
.group.is-open {
  border-color: rgba(0,69,128,.35);
}
.group__trigger {
  border: 0;
  background: #fff;
  text-align: left;
  width: 100%;
  min-height: 60px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.group__trigger:hover {
  background: var(--pmsh-pale-1);
}
.group__title {
  color: var(--deep);
  font-weight: 700;
  font-size: 13px;
}
.group__subtitle {
  display: block;
  color: var(--soft);
  font-size: 11px;
  margin-top: 2px;
}
.group__icon {
  color: var(--soft);
  flex: none;
  transition: transform .2s;
}
.group.is-open .group__icon {
  transform: rotate(180deg);
}
.group__content {
  background: #fff;
  min-height: 0;
  overflow: hidden;
  padding: 0 14px 0;
  opacity: 0;
  transition: opacity .38s ease,padding-bottom .62s cubic-bezier(.25,.72,.27,1);
}
.q {
  padding: 13px 0;
  border-top: 1px solid var(--pmsh-bord);
}
.q:first-child {
  border-top: 1px solid var(--pmsh-bord);
}
.q-label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.48;
  font-weight: 600;
  color: var(--pmsh-marine);
  margin: 0 0 10px;
}
.q-label strong {
  color: var(--red);
}
.q-label .optional {
  color: var(--soft);
  font-size: 10.5px;
  font-weight: 400;
  white-space: nowrap;
  margin-left: auto;
}
.q-help {
  font-size: 11.5px;
  color: var(--soft);
  margin: -5px 0 10px;
  max-width: 650px;
}
.numeric-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px 14px;
}
.num-card {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 9px;
  min-width: 0;
}
.num-card-row {
  display: flex;
  gap: 8px;
}
.dynamic-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--motion-expand) var(--motion-ease),opacity .32s ease,margin var(--motion-expand) var(--motion-ease);
}
.group__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 1;
  transition: grid-template-rows .62s cubic-bezier(.25,.72,.27,1),opacity .40s ease;
}
.medical-reveal-row {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--motion-expand) var(--motion-ease),opacity .32s ease,margin var(--motion-expand) var(--motion-ease);
  margin-top: 0;
}
.dynamic-reveal.is-visible,
.group.is-open .group__panel {
  grid-template-rows: 1fr;
  opacity: 1;
}
.medical-reveal-row.has-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 13px;
}
.medical-reveal-row__inner,
.reveal-inner {
  min-height: 0;
  overflow: hidden;
}
.dynamic-reveal > .reveal-inner {
  min-width: 0;
}
.group.is-open .group__content {
  padding-bottom: 16px;
  opacity: 1;
}
.group__panel[aria-hidden="true"] .group__content {
  pointer-events: none;
}

/* Vérification et envoi */
.review {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 11px;
  overflow: hidden;
}
.review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  background: var(--pmsh-pale-1);
  border-bottom: 1px solid var(--line);
}
.review__head strong {
  font-size: 13px;
  color: var(--deep);
}
.review__head button {
  border: 0;
  color: var(--navy);
  font-weight: 600;
  background: none;
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 3px;
}
.review__content {
  padding: 12px 13px;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px 15px;
}
.review-cell {
  min-width: 0;
}
.review-cell .review-label {
  display: block;
  color: var(--soft);
  font-size: 10.5px;
}
.review-cell .review-value {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.review-details {
  display: grid;
  gap: 7px;
}
.review-details .review-cell {
  display: grid;
  grid-template-columns: minmax(150px,42%) 1fr;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--pmsh-bord);
}
.review-details .review-cell:last-child {
  border: 0;
  padding: 0;
}
.review-details .review-label {
  font-size: 11.5px;
}
.review-details .review-value {
  font-size: 11.5px;
  font-weight: 500;
}
.preflight {
  padding: 13px 14px;
  background: var(--pmsh-pale-1);
  border: 1px solid var(--pmsh-bord);
  border-radius: 10px;
  margin-top: 15px;
  display: grid;
  gap: 10px;
}
.success-state {
  text-align: center;
  padding: 13px 5px 18px;
}
.success-ring {
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  background: var(--pmsh-pale-2);
  color: var(--pmsh-bleu);
  border-radius: 50%;
  margin: 0 auto 17px;
}
.success-ring svg {
  width: 34px;
  height: 34px;
}
.success-state h2 {
  font-size: 22px;
  color: var(--deep);
  margin: 0 0 9px;
}
.success-state p {
  color: var(--grey);
  font-size: 13px;
  margin: 0 auto 12px;
  max-width: 460px;
}
.done-note {
  display: inline-block;
  padding: 8px 12px;
  background: var(--pmsh-pale-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--grey);
}

/* Parcours « vivants » : arrivée échelonnée, barre de progression fine, glissement des questions, coche animée */
.dialog__barre {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pmsh-pale-2);
  pointer-events: none;
  transition: opacity .3s ease;
}
.dialog__barre i {
  display: block;
  height: 100%;
  background: var(--pmsh-bleu);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--ease);
}
.dialog__barre.is-finie {
  opacity: 0;
}
/* glissement : vers la gauche en avançant, vers la droite en reculant */
.dialog.is-switching[data-sens="avant"] > .dialog__body {
  transform: translate3d(28px, 0, 0);
}
.dialog.is-switching[data-sens="arriere"] > .dialog__body {
  transform: translate3d(-28px, 0, 0);
}
.dialog.is-switching.is-revealing > .dialog__body {
  transform: none;
  transition: opacity .31s ease, transform .36s var(--ease);
}
.transition-ghost > :nth-child(2) {
  transition: transform .31s var(--ease);
}
.dialog.is-revealing[data-sens="avant"] > .transition-ghost > :nth-child(2) {
  transform: translate3d(-28px, 0, 0);
}
.dialog.is-revealing[data-sens="arriere"] > .transition-ghost > :nth-child(2) {
  transform: translate3d(28px, 0, 0);
}
/* petite coche sur la réponse choisie */
.choice .check-icon path {
  stroke-dasharray: 22;
  stroke-dashoffset: 0;
}
.choice.vient-coche .check-icon {
  animation: coche-pastille 240ms var(--ease);
}
.choice.vient-coche .check-icon path {
  animation: coche-trace 260ms ease-out 40ms backwards;
}
.retour-site {
  color: var(--pmsh-bleu);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.retour-site::before {
  content: "← ";
}
@media (prefers-reduced-motion: no-preference) {
  /* la carte cliquée sur l'accueil devient cet en-tête (et inversement au retour) */
  .dialog__head {
    view-transition-name: parcours-entete;
  }
  .arrivee .dialog__head > .brand { animation: arrivee-haut 360ms var(--ease) 40ms backwards; }
  .arrivee .dialog__head > .brand-tag { animation: arrivee-haut 360ms var(--ease) 100ms backwards; }
  .arrivee .dialog__head > .headline { animation: arrivee-haut 360ms var(--ease) 150ms backwards; }
  .arrivee .dialog__head > .head-subtitle { animation: arrivee-haut 360ms var(--ease) 200ms backwards; }
  .arrivee .dialog__head > .progress { animation: arrivee-fondu 360ms ease 240ms backwards; }
  .arrivee .dialog__body .stage-content { animation: none; }
  .arrivee .dialog__body .stage-content > * { animation: arrivee-haut 360ms var(--ease) 280ms backwards; }
  .arrivee .dialog__body .stage-content > :nth-child(2) { animation-delay: 320ms; }
  .arrivee .dialog__body .stage-content > :nth-child(3) { animation-delay: 360ms; }
  .arrivee .dialog__body .stage-content > :nth-child(n + 4) { animation-delay: 400ms; }
  .arrivee .dialog__footer { animation: arrivee-haut 360ms var(--ease) 440ms backwards; }
  .arrivee .demo-caption { animation: arrivee-fondu 360ms ease 480ms backwards; }
}
@keyframes arrivee-haut { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@keyframes arrivee-fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes coche-pastille { from { transform: scale(.6); } 60% { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes coche-trace { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }

/* Animations */
@keyframes fade-enter { from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)} }
@keyframes content-appear { from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)} }

/* Téléphone */
@media (max-width: 650px) {
  .screen {
    padding: 10px 10px 9px;
    gap: 8px;
  }
  .dialog {
    width: 100% !important;
    max-height: calc(100dvh - 63px);
    border-radius: 13px;
    transition: height .4s var(--ease),transform .35s var(--ease);
  }
  .dialog__head {
    padding: 13px 16px 9px;
  }
  .brand {
    width: 136px;
    height: 49px;
    margin-bottom: 10px;
  }
  .brand-tag {
    margin-bottom: 6px;
    font-size: 9px;
    letter-spacing: .16em;
  }
  .headline {
    font-size: 19px;
  }
  .head-subtitle {
    font-size: 11.5px;
    margin-top: 3px;
  }
  .progress {
    margin: 10px auto 0;
  }
  .dialog__body {
    padding: 11px 15px 11px;
  }
  .dialog__footer {
    padding: 11px 15px 14px;
  }
  .btn {
    font-size: 12.5px;
    padding: 9px 12px;
  }
  .demo-caption {
    font-size: 10px;
  }
  .form-grid {
    gap: 10px 10px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .step-intro {
    font-size: 12px;
  }
  .q .choice {
    min-height: 35px;
  }
  .field.mobile-full {
    grid-column: span 2;
  }
  .q-label {
    font-size: 12px;
  }
  .numeric-grid {
    grid-template-columns: 1fr;
  }
  .review-details .review-cell {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 640px) {
  select,
  textarea,
  input:not([type=checkbox]):not([type=radio]) {
    font-size: 16px;
  }
}

@media (max-width: 350px) {
  .dialog__head {
    padding-top: 10px;
  }
  .brand {
    margin-bottom: 6px;
  }
  .dialog__footer {
    padding-bottom: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .choice {
    font-size: 11px;
    padding: 6px 9px;
  }
  .field.mobile-full {
    grid-column: span 1;
  }
}

@media (max-height: 650px) {
  .dialog__head {
    padding-top: 10px;
  }
  .brand {
    width: 125px;
    height: 38px;
    margin-bottom: 5px;
  }
  .brand-tag {
    margin-bottom: 6px;
  }
  .progress {
    margin-top: 7px;
  }
  .dialog__body {
    padding-top: 8px;
  }
  .dialog__footer {
    padding-top: 9px;
    padding-bottom: 10px;
  }
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  /* durée nulle (et non 0,01 ms) : sinon la visibilité héritée « transite » et un élément reste masqué un instant */
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .transition-ghost {
    display: none;
  }
  .conditional-field.is-visible .reveal-inner {
    animation: none !important;
  }
}

/* Bouton WhatsApp : sur téléphone et tablette, une réserve en bas de l'écran pour qu'il ne couvre jamais les boutons */
@media (max-width: 1099px) {
  .screen {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .dialog {
    max-height: calc(100dvh - 66px - 76px - env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 650px) {
  .screen {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .dialog {
    max-height: calc(100dvh - 63px - 72px - env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .dialog.is-switching > .dialog__body,
  .transition-ghost > :nth-child(2) {
    transform: none !important;
  }
  .choice.vient-coche .check-icon,
  .choice.vient-coche .check-icon path {
    animation: none !important;
  }
}
