/*
 * Pas à pas myVoltalis : styles isolés sous .pap pour l'intégration dans voltalis.com.
 * Valeurs issues du Figma myVoltalis (variables color/*, spacing/*, styles myVoltalis/*).
 */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }

.pap {
  --pap-text-primary: #3d3d4d;
  --pap-text-secondary: #696986;
  --pap-text-brand: #609cf1;
  --pap-text-brand-strong: #1f3766;
  --pap-text-inverse: #f9f9fb;
  --pap-bg-surface: #ffffff;
  --pap-bg-brand: #f2f7fe;
  --pap-bg-brand-bold: #609cf1;
  --pap-bg-skeleton: #e5edff;
  --pap-bg-success: #d9f8ec;
  --pap-bg-warning: #fff4d8;
  --pap-bg-neutral: #f6f6f9;
  --pap-bg-subtle: #f7f7f7;
  --pap-text-success: #4ae19b;
  --pap-text-warning: #ffc533;
  --pap-icon-warning: #f0a800;
  --pap-bg-glass: rgba(255, 255, 255, 0.3);
  --pap-border-default: #f0f0f4;
  --pap-border-brand-subtle: #d9e8fd;
  --pap-gradient-primary: linear-gradient(175.9deg, #609cf1 25.77%, #8fbaf5 126.5%);
  --pap-shadow-default: rgba(31, 55, 102, 0.1);
  --pap-page-margin: 16px;
  /* Hauteur d'un en-tête fixe de la page hôte, pour que l'en-tête du parcours se colle juste en dessous. */
  --pap-sticky-top: 0px;
  /* Colonnes du desktop : illustration à gauche, texte et choix à droite. */
  --pap-media-col: 361px;
  --pap-col-gap: 40px;

  color-scheme: light;
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  color: var(--pap-text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.pap *,
.pap *::before,
.pap *::after { box-sizing: border-box; }

/* Remises à zéro sans spécificité (:where) pour ne pas écraser les classes des composants. */
.pap :where(button) { font: inherit; color: inherit; cursor: pointer; margin: 0; }
.pap :where(p, h1, h2, figure, ul, ol) { margin: 0; }
.pap :where(img) { display: block; max-width: 100%; height: auto; }
.pap :focus-visible { outline: 2px solid var(--pap-text-brand); outline-offset: 2px; }
.pap-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Coque ---------- */

/* La mise en page suit la largeur donnée au parcours (requêtes de conteneur), pas celle de l'écran :
 * il s'adapte aussi bien à la page de démonstration qu'à une colonne de voltalis.com. */
.pap-stage { flex: 1 1 auto; min-width: 0; container: pap / inline-size; }

/* Mobile : plein écran. C'est la page qui défile ; l'en-tête et les actions restent collés en haut et en bas. */
.pap-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--pap-bg-surface);
}

.pap-nav {
  position: sticky;
  top: var(--pap-sticky-top);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 var(--pap-page-margin);
  flex-shrink: 0;
  background: var(--pap-bg-surface);
}

.pap-nav__back,
.pap-nav__quit {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  padding: 8px;
  margin: -8px;
  border-radius: 999px;
}

.pap-nav__back[hidden] { display: inline-flex; visibility: hidden; }
.pap-nav__quit { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--pap-text-primary); }

.pap-body { flex: 1 0 auto; display: flex; flex-direction: column; }
.pap-screen { flex: 1 0 auto; display: flex; flex-direction: column; }
.pap-screen.is-entering { animation: pap-enter 240ms cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes pap-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- En-tête d'étape ---------- */

.pap-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px var(--pap-page-margin) 0;
}

.pap-head__row { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }

.pap-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pap-bg-brand);
  color: var(--pap-text-brand);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pap-tag--todo { background: #fff4d8; color: #8a5a00; }

.pap-counter { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.02em; color: var(--pap-text-secondary); }

.pap-title { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--pap-text-primary); }
.pap-title:focus { outline: none; }

.pap-progress { display: flex; gap: 6px; }
.pap-progress__seg { flex: 1; height: 6px; border-radius: 3px; background: var(--pap-bg-skeleton); }
.pap-progress__seg.is-done { background: var(--pap-bg-brand-bold); }

/* ---------- Contenu ---------- */

.pap-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 15px var(--pap-page-margin);
}

.pap-content--result { padding-top: 8px; }

.pap-stack { display: flex; flex-direction: column; gap: 18px; }

.pap-text { font-size: 14px; line-height: 20px; text-align: center; color: var(--pap-text-primary); }
.pap-text strong { font-weight: 700; }
.pap-text--body { font-weight: 400; }
.pap-text--strong { font-weight: 500; letter-spacing: 0.02em; }
.pap-text--brand { font-weight: 600; letter-spacing: 0.02em; color: var(--pap-text-brand); }
.pap-text--lead { font-weight: 400; text-align: left; margin-top: -8px; }
/* Sous une barre de progression, l'introduction garde l'espacement normal. */
.pap-head--step + .pap-content > .pap-text--lead:first-child { margin-top: 0; }
.pap-text--precision { font-weight: 500; letter-spacing: 0.02em; color: var(--pap-text-brand); }
.pap-text--precision strong { font-weight: 600; }

.pap-text--heading { font-size: 18px; line-height: 28px; font-weight: 600; }
.pap-text--note { font-size: 12px; line-height: 16px; font-style: italic; font-weight: 400; }

.pap-icon-inline { display: inline-flex; vertical-align: -4px; }
.pap-icon-inline img { display: inline-block; }
.pap-icon-inline--sun { vertical-align: -3px; }

.pap-card {
  background: var(--pap-bg-glass);
  border: 1px solid var(--pap-border-default);
  border-radius: 21px;
}

/* Illustrations exportées de Figma (cartes comprises) */
.pap-figure { display: flex; justify-content: center; }
.pap-figure--fill { flex: 1 0 auto; align-items: center; }
.pap-figure__frame { position: relative; display: block; }

.pap-figures {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 16px;
}

.pap-figures__item { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }

.pap-caption { text-align: center; font-size: 14px; line-height: 20px; color: var(--pap-text-primary); }
.pap-caption--legend { font-weight: 400; }
.pap-caption--legend strong { font-weight: 600; }
.pap-caption--body { font-weight: 400; }
.pap-caption--heading { font-size: 18px; line-height: 28px; font-weight: 600; }

/* ---------- Choix ---------- */

.pap-options { display: flex; flex-direction: column; gap: 16px; }

.pap-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  text-align: left;
  background: var(--pap-bg-surface);
  border: 1px solid var(--pap-border-default);
  border-radius: 18px;
  transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease;
}

.pap-option:hover { border-color: var(--pap-border-brand-subtle); background: #fbfcff; }
.pap-option:active { transform: scale(0.99); }
.pap-option .pap-icon { flex-shrink: 0; }

.pap-option__text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.pap-option__label { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: 0.02em; color: var(--pap-text-primary); }
.pap-option__hint { font-size: 12px; line-height: normal; font-style: italic; font-weight: 400; color: var(--pap-text-secondary); }

.pap-option--compact { padding-top: 15px; padding-bottom: 15px; }

.pap-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 16px;
  text-align: center;
}

.pap-question__title { font-size: 18px; line-height: 28px; font-weight: 600; }
.pap-question__text { font-size: 14px; line-height: 20px; font-weight: 400; }

.pap-help { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 24px; }
.pap-help__label { text-align: center; font-size: 14px; line-height: 20px; }

/* ---------- Pastilles ---------- */

.pap-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; flex-shrink: 0; }
.pap-badge--md { width: 44px; height: 44px; }
.pap-badge--xl { width: 60px; height: 60px; }
.pap-badge--brand { background: var(--pap-bg-brand); }
.pap-badge--success { background: var(--pap-bg-success); }
.pap-badge--warning { background: var(--pap-bg-warning); }

/* ---------- Résultat ---------- */

.pap-result {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 16px;
  border-radius: 20px;
}

.pap-result__body { display: flex; flex-direction: column; gap: 24px; width: 100%; margin-bottom: 14px; }
.pap-result__title { font-size: 24px; line-height: 32px; font-weight: 700; text-align: center; }
.pap-result__title:focus { outline: none; }
.pap-result__text { display: flex; flex-direction: column; gap: 20px; }
.pap-result__text p { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.02em; text-align: center; }

/* Variante des écrans de dépannage (Figma AutoDiag v2.3 et Pas à pas v2.1) */
.pap-result--compact { gap: 16px; }
.pap-result--compact .pap-result__body { gap: 16px; margin-bottom: 0; }
.pap-result--compact .pap-result__title { font-size: 20px; line-height: 28px; font-weight: 600; }
.pap-result--compact .pap-result__text { gap: 18px; }
.pap-result__text strong { font-weight: 700; }
.pap-result__note { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.02em; text-align: center; color: var(--pap-text-brand); margin-top: 8px; }

.pap-inset { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--pap-bg-neutral); text-align: center; font-size: 14px; line-height: 20px; }
.pap-inset__title { font-weight: 600; margin-bottom: 4px; }

/* ---------- Contacter Voltalis (Figma 16170:77379) ---------- */

.pap-head--center { align-items: center; gap: 12px; text-align: center; }
.pap-head--center + .pap-content { padding-top: 40px; }

.pap-sheets { display: flex; flex-direction: column; gap: 16px; }
.pap-sheet { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 16px; background: var(--pap-bg-subtle); text-align: center; }
.pap-sheet__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.pap-sheet__text { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--pap-text-secondary); text-wrap: balance; }
.pap-sheet__note { margin-top: -8px; font-size: 12px; line-height: 18px; font-style: italic; color: var(--pap-text-secondary); }

.pap-phone {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 16px;
  border: 2px solid var(--pap-border-default);
  border-radius: 16px;
  background: var(--pap-bg-surface);
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.pap-phone:hover { border-color: var(--pap-border-brand-subtle); }
.pap-phone .pap-icon { flex-shrink: 0; }
.pap-phone__body { display: flex; flex-direction: column; gap: 2px; padding-left: 19px; border-left: 2px solid var(--pap-border-default); }
.pap-phone__label { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--pap-text-secondary); }
.pap-phone__number { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--pap-text-success); white-space: nowrap; }
.pap-phone__hours { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--pap-text-secondary); }

/* ---------- Guide de pilotage et consignes (Figma 16170:77665, 16170:77687) ---------- */

.pap-text--section { margin: 6px 0 -6px; text-align: left; }

/* Icônes en masque : la couleur vient de la propriété color de chaque élément. */
.pap-mode__icon,
.pap-mode-tag__icon,
.pap-hint__icon,
.pap-warning__icon,
.pap-topic__icon,
.pap-pill__icon,
.pap-room__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pap-mode--confort { --pap-mode-strong: #ffc533; --pap-mode-bg: #fff4d8; --pap-mode-fg: #8f5b00; --pap-mode-icon: #f0a800; }
.pap-mode--eco { --pap-mode-strong: #2ccb86; --pap-mode-bg: #d9f8ec; --pap-mode-fg: #166b47; --pap-mode-icon: #1ead6f; }
.pap-mode--temp { --pap-mode-strong: #887bff; --pap-mode-bg: #eceaff; --pap-mode-fg: #4a3ad1; --pap-mode-icon: #6e5eff; }
.pap-mode--horsgel { --pap-mode-strong: #b1d3fb; --pap-mode-bg: #f2f7fe; --pap-mode-fg: #609cf1; --pap-mode-icon: #609cf1; }
.pap-mode--arret { --pap-mode-strong: #f16a6a; --pap-mode-bg: #f7f7f7; --pap-mode-fg: #696986; --pap-mode-icon: #696986; }

.pap-modes { display: flex; flex-direction: column; gap: 24px; }
.pap-modes__tabs { display: flex; justify-content: space-between; padding: 0 8px; }

.pap-mode { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 58px; padding: 0; border: 0; background: none; }

.pap-mode__circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid #d4d4dd;
  border-radius: 999px;
  background: var(--pap-bg-surface);
  color: var(--pap-text-secondary);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.pap-mode__icon { width: 27px; height: 27px; }
.pap-mode__label { font-size: 11px; line-height: 16px; font-weight: 500; color: #8b8bb0; }
.pap-mode:hover .pap-mode__circle { border-color: var(--pap-mode-strong); }
.pap-mode[aria-selected="true"] .pap-mode__circle { border-color: var(--pap-mode-strong); background: var(--pap-mode-strong); color: var(--pap-text-inverse); }
.pap-mode[aria-selected="true"] .pap-mode__label { font-weight: 700; }

.pap-mode-tabpanel { display: flex; flex-direction: column; gap: 24px; }
.pap-mode-tabpanel[hidden] { display: none; }
.pap-mode-tabpanel__note { font-size: 14px; line-height: 20px; text-align: center; }
.pap-mode-tabpanel__note strong { font-weight: 600; }
.pap-mode-panel { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 20px; background: var(--pap-bg-surface); text-align: left; }

.pap-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 16px;
  background: var(--pap-mode-bg);
  color: var(--pap-mode-fg);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.pap-mode-tag__icon { color: var(--pap-mode-icon); }
.pap-mode-panel__title { margin-top: -8px; padding-bottom: 18px; border-bottom: 1px solid var(--pap-border-default); font-size: 16px; line-height: 24px; font-weight: 600; }
.pap-mode-panel__text { font-size: 14px; line-height: 20px; }
.pap-mode-panel__text strong { font-weight: 500; }

.pap-hint { display: flex; gap: 8px; font-size: 14px; line-height: 20px; }
.pap-hint--strong { font-weight: 500; }
.pap-hint__icon { margin-top: 1px; color: var(--pap-text-secondary); }

.pap-warning { display: flex; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--pap-text-warning); }
.pap-warning__icon { margin-top: 1px; color: var(--pap-icon-warning); }

.pap-link { padding: 0; border: 0; background: none; font-weight: 700; }
.pap-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Onglets en pastilles (modes rapides) et simulation par pièce (Figma 16170:78864, 16170:78762) */
.pap-modes--card { gap: 16px; padding: 16px; border-radius: 20px; background: var(--pap-bg-surface); }
.pap-modes__tabs--pills { justify-content: center; gap: 8px; padding: 0; }

.pap-pill {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--pap-border-default);
  border-radius: 999px;
  background: var(--pap-bg-surface);
  font-size: 15px;
  line-height: 24px;
  font-weight: 600;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.pap-pill:hover { border-color: var(--pap-border-brand-subtle); }
.pap-pill[aria-selected="true"] { border-color: var(--pap-bg-brand-bold); background: var(--pap-bg-brand); }

/* Dans la simulation, seule la pastille choisie affiche son nom (lu quand même par les lecteurs d'écran). */
.pap-modes--card .pap-modes__tabs--pills { justify-content: flex-start; }
.pap-modes--card .pap-pill { flex: 0 0 auto; padding: 8px 12px; }
.pap-modes--card .pap-pill[aria-selected="false"] { padding: 8px; }
.pap-modes--card .pap-pill[aria-selected="false"] .pap-pill__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pap-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }

.pap-room {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  border: 1px solid var(--pap-border-default);
  border-radius: 12px;
  background: var(--pap-bg-surface);
}

.pap-room__name { font-size: 12px; line-height: 16px; font-weight: 600; text-align: center; }
.pap-room__badge { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--pap-mode-bg); }
.pap-room__icon { width: 18px; height: 18px; color: var(--pap-mode-icon); }
.pap-room__label { font-size: 12px; line-height: 16px; color: var(--pap-text-secondary); }

/* Guides de pilotage : cartes de sujets, encadrés (Figma 16170:78536 à 16170:79282) */
.pap-panel { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 20px; background: var(--pap-bg-surface); }
.pap-panel--left .pap-text { text-align: left; }
.pap-text--subheading { font-size: 16px; line-height: 24px; font-weight: 600; }

.pap-topics { display: flex; flex-direction: column; gap: 24px; padding: 24px; border-radius: 20px; background: var(--pap-bg-surface); }
.pap-topics--separate { gap: 16px; padding: 0; background: none; }
.pap-topics--separate .pap-topic-item { padding: 16px; border-radius: 20px; background: var(--pap-bg-surface); }
.pap-topics__title { font-size: 14px; line-height: 20px; font-weight: 500; }

.pap-topic-item { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 20px; }
.pap-topic-item--row { align-items: center; }
.pap-topic-item__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pap-topic-item__body strong { font-weight: 600; }
.pap-topic-item__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.pap-topic-item__subtitle { font-weight: 500; }

.pap-topic-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: currentColor;
  color: var(--pap-mode-icon, var(--pap-text-brand));
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pap-topic-item__icon--muted { color: var(--pap-text-primary); }

.pap-topic-item__number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--pap-text-brand);
  border-radius: 4px;
  color: var(--pap-text-brand);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

.pap-callout { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; text-align: center; }
.pap-callout--brand { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--pap-text-brand); }
.pap-callout__title { display: flex; align-items: center; gap: 6px; font-weight: 500; }

.pap-callout__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: currentColor;
  color: var(--pap-text-brand);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pap-callout__icon--lg { width: 24px; height: 24px; }

/* Fiche « En savoir plus » (Figma 16170:77926) */
.pap-modal--sheet { max-height: calc(100dvh - 32px); overflow-y: auto; }
.pap-modal__box.pap-info-sheet { align-items: stretch; text-align: left; }
.pap-info-sheet .pap-tag { align-self: flex-start; padding: 4px 8px; font-size: 14px; line-height: 20px; }
.pap-info-sheet .pap-modal__title { margin-top: 18px; }
.pap-info-sheet__body { display: flex; flex-direction: column; gap: 24px; margin-top: 12px; font-size: 14px; line-height: 20px; }
.pap-info-sheet__body strong { font-weight: 500; }
.pap-topic { display: flex; flex-direction: column; gap: 8px; }
.pap-topic__title { display: flex; align-items: center; gap: 4px; font-size: 16px; line-height: 24px; font-weight: 600; }
.pap-topic__icon { color: var(--pap-text-brand); }
.pap-info-sheet__inset { padding: 12px; border-radius: 20px; background: var(--pap-bg-brand); text-align: center; font-weight: 500; }
.pap-info-sheet .pap-modal__actions { margin-top: 24px; }

/* Carte coupée en deux : illustration exportée (avec ses bordures) + partie HTML */
.pap-split { display: flex; flex-direction: column; align-items: center; }
.pap-split > img { width: 361px; max-width: 100%; }
.pap-split__caption {
  width: 361px;
  max-width: 100%;
  padding: 0 16px 24px;
  border: 1px solid var(--pap-border-default);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  background: var(--pap-bg-glass);
  text-align: center;
  font-size: 14px;
  line-height: 20px;
}

.pap-split__caption strong { font-weight: 700; }
.pap-result--split { flex: 0 0 auto; width: 361px; max-width: 100%; padding-bottom: 0; border-bottom: 0; border-radius: 20px 20px 0 0; }

.pap-next-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: var(--pap-bg-glass);
  border: 1px solid var(--pap-border-brand-subtle);
  border-radius: 20px;
}

.pap-next-step__text { display: flex; flex-direction: column; gap: 2px; font-weight: 500; }
.pap-next-step__caption { font-size: 11px; line-height: 16px; letter-spacing: 0.02em; color: var(--pap-text-brand); }
.pap-next-step__label { font-size: 14px; line-height: 20px; letter-spacing: 0.02em; color: var(--pap-text-brand-strong); }

/* ---------- Actions ---------- */

.pap-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  background: var(--pap-bg-surface);
  border-top: 1px solid var(--pap-border-default);
  padding: 12px var(--pap-page-margin) max(16px, env(safe-area-inset-bottom));
}

.pap-footer[hidden] { display: none; }
/* Copie des actions à côté d'une illustration : affichée seulement sur desktop, à la place de la barre du bas. */
.pap-content__actions { display: none; }

.pap-actions { display: flex; flex-direction: column; gap: 8px; }

.pap-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  transition: filter 160ms ease, background-color 160ms ease, transform 120ms ease;
}

.pap-button:active { transform: scale(0.99); }

.pap-button--primary {
  border: 0;
  color: var(--pap-text-inverse);
  background: var(--pap-gradient-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pap-button--primary:hover { filter: brightness(1.05); }

.pap-button--secondary {
  border: 2px solid var(--pap-border-default);
  background: transparent;
  color: var(--pap-text-primary);
}

.pap-button--secondary:hover { background: rgba(240, 240, 244, 0.6); }

.pap-button--link {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  background: none;
  color: var(--pap-text-primary);
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pap-button__icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.pap-button--placeholder {
  border: 2px dashed #f1c25b;
  background: #fffbf0;
  color: #8a5a00;
}

/* ---------- Modale ---------- */

.pap-modal {
  width: calc(100% - 32px);
  max-width: 361px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--pap-bg-surface);
  box-shadow: 0 10px 25px rgba(31, 55, 102, 0.15);
  color: var(--pap-text-primary);
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

.pap-modal::backdrop { background: rgba(57, 65, 71, 0.05); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.pap-modal[open] { animation: pap-pop 200ms cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes pap-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

.pap-modal__box { display: flex; flex-direction: column; align-items: center; padding: 24px; text-align: center; }
.pap-modal__title { margin-top: 16px; font-size: 20px; line-height: 28px; font-weight: 600; }
.pap-modal__text { margin-top: 16px; font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: 0.02em; color: var(--pap-text-secondary); }
.pap-modal__actions { display: flex; flex-direction: column; gap: 16px; width: 100%; margin-top: 20px; }

/* ---------- Branche à définir ---------- */

.pap-todo { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px; border: 2px dashed #f1c25b; background: #fffbf0; }
.pap-todo__text { font-size: 15px; line-height: 22px; font-weight: 500; }
.pap-todo__label { font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #8a5a00; }
.pap-todo__list { padding-left: 18px; font-size: 14px; line-height: 20px; }
.pap-todo__hint { font-size: 12px; line-height: 16px; color: var(--pap-text-secondary); }

.pap-todo-chip {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1c25b;
  color: #4a3000;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.02em;
  pointer-events: none;
}


/* ---------- Atelier ---------- */

.pap-atelier {
  flex: 0 0 360px;
  align-self: flex-start;
  position: sticky;
  top: 24px;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  margin: 24px 24px 24px 0;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(6, 31, 67, 0.08);
  font-size: 13px;
  line-height: 18px;
}

.pap--atelier-closed .pap-atelier { display: none; }

.pap-atelier__head { position: sticky; top: -16px; margin: -16px -16px 0; padding: 16px; background: #ffffff; border-bottom: 1px solid var(--pap-border-default); z-index: 1; }
.pap-atelier__title { font-size: 15px; line-height: 22px; font-weight: 600; }
.pap-atelier__meta { margin-top: 2px; color: var(--pap-text-secondary); font-size: 12px; }
.pap-atelier__tools { display: flex; gap: 8px; margin-top: 10px; }
.pap-atelier__tools button { padding: 6px 12px; border: 1px solid var(--pap-border-default); border-radius: 999px; background: #ffffff; font-size: 12px; font-weight: 500; }
.pap-atelier__tools button:hover { border-color: var(--pap-border-brand-subtle); }

.pap-atelier__section { margin: 18px 0 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pap-text-secondary); }

.pap-atelier__questions,
.pap-atelier__screens,
.pap-atelier__edges { list-style: none; padding: 0; }

.pap-atelier__questions { display: flex; flex-direction: column; gap: 6px; }
.pap-atelier__questions button,
.pap-atelier__screen > button {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.pap-atelier__questions button:hover:not(:disabled),
.pap-atelier__screen > button:hover { background: var(--pap-bg-brand); }
.pap-atelier__questions button:disabled { cursor: default; }

.pap-atelier__todo {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff1cc;
  color: #7a4f00;
  font-size: 11px;
  line-height: 18px;
  font-weight: 600;
}

.pap-atelier__screen.is-active > button { background: var(--pap-bg-brand); box-shadow: inset 3px 0 0 var(--pap-text-brand); }
.pap-atelier__screen strong { display: block; font-weight: 600; }
.pap-atelier__screen small { display: block; color: var(--pap-text-secondary); font-size: 11px; }
.pap-atelier__num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px; background: var(--pap-border-default); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.pap-atelier__edges { margin: 0 0 8px 40px; color: var(--pap-text-secondary); font-size: 12px; }
.pap-atelier__edges li { padding: 1px 0; }
.pap-atelier__edges code { font-size: 11px; color: var(--pap-text-brand-strong); }
.pap-atelier__edges .pap-atelier__todo { display: inline-block; }

.pap-atelier-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pap-text-brand-strong);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(6, 31, 67, 0.2);
}

/* ---------- Largeurs ---------- */

/* Petits téléphones (moins de 360 px) : on resserre ce qui est dessiné pour 393 px. */
@container pap (max-width: 359px) {
  .pap-modes__tabs { padding: 0; }
  .pap-mode { width: 50px; }
  .pap-mode__circle { width: 50px; height: 50px; }
  .pap-mode__icon { width: 24px; height: 24px; }
  .pap-phone { gap: 12px; padding: 16px 12px; }
  .pap-phone__body { padding-left: 12px; }
}

/* Tablette : carte centrée, une colonne, aussi haute que son contenu (les actions suivent le texte au lieu d'attendre en bas d'un grand vide). */
@container pap (min-width: 600px) {
  .pap-shell {
    --pap-page-margin: 32px;
    width: calc(100% - 48px);
    max-width: 600px;
    min-height: 0;
    margin: 24px auto;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(6, 31, 67, 0.12);
  }
  .pap-nav { border-radius: 28px 28px 0 0; }
  .pap-footer { border-radius: 0 0 28px 28px; }
  /* Sur mobile, la carte de résultat occupe tout l'écran ; dans une carte, elle s'arrête à son contenu. */
  .pap-result { flex-grow: 0; }
}

/* Desktop : même cadre de 760 px pour tous les écrans (l'en-tête et le titre ne bougent pas d'un écran à l'autre).
 * Un écran illustré place l'image à gauche, le texte et ses boutons à droite. */
@container pap (min-width: 880px) {
  .pap-shell { --pap-page-margin: 40px; max-width: 840px; }
  /* Un bouton de 760 px de large se lit comme une barre : on le ramène à la largeur d'un bouton. */
  .pap-footer .pap-actions { max-width: 400px; margin-inline: auto; }
  .pap-sheet > :is(.pap-button, .pap-phone) { width: 100%; max-width: 400px; align-self: center; }
  /* Les cinq onglets des consignes restent groupés au lieu de s'écarter sur toute la largeur. */
  .pap-modes__tabs:not(.pap-modes__tabs--pills) { width: 100%; max-width: 440px; align-self: center; }

  /* Plusieurs illustrations (voyants à observer) : côte à côte plutôt qu'empilées. */
  .pap-shell[data-layout="single"] .pap-figures { flex-direction: row; justify-content: center; align-items: flex-start; gap: 40px; }
  .pap-shell[data-layout="single"] .pap-figures__item { flex: 0 1 320px; }

  /* Une ligne par bloc de texte et pour les boutons (--pap-rows, posé par le moteur), entre deux lignes souples qui se
   * partagent ce que l'illustration a de plus : un texte plus court qu'elle se centre à sa hauteur, un plus long part du haut.
   * Le ::before occupe la première ligne souple ; l'espacement passe par les marges pour que ces lignes vides n'en ajoutent pas.
   * La grille ne s'étire pas : sinon le centrage se ferait sur toute la hauteur de la carte et non sur celle de l'image. */
  .pap-shell[data-layout="media"] .pap-content {
    flex-grow: 0;
    padding-bottom: 40px;
    display: grid;
    grid-template-columns: var(--pap-media-col) minmax(0, 1fr);
    grid-template-rows: 1fr repeat(var(--pap-rows), auto) 1fr;
    column-gap: var(--pap-col-gap);
    align-items: start;
  }
  .pap-shell[data-layout="media"] .pap-content::before { content: ""; grid-column: 2; grid-row: 1; }
  .pap-shell[data-layout="media"] .pap-content > * { grid-column: 2; margin-top: 0; }
  .pap-shell[data-layout="media"] .pap-content > :not(.pap-content__media) ~ :not(.pap-content__media) { margin-top: 18px; }
  /* À côté d'une image, le texte centré du mobile se lit mal : il s'aligne à gauche. */
  .pap-shell[data-layout="media"] :is(.pap-content > .pap-text, .pap-stack .pap-text) { text-align: left; }
  .pap-shell[data-layout="media"] .pap-content > .pap-content__media {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: calc(var(--pap-sticky-top) + 78px);
  }
  .pap-shell[data-layout="media"] .pap-content > :not(.pap-content__media) ~ .pap-content__actions { display: block; margin-top: 32px; }
  .pap-shell[data-layout="media"] .pap-footer { display: none; }
}

/* Téléphone à l'horizontale : collées en bas, les actions prendraient la moitié de l'écran. */
@media (max-height: 500px) {
  .pap-footer { position: static; }
}

@media (min-width: 600px) {
  .pap-modal--sheet { max-width: 480px; }
}

@media (max-width: 900px) {
  .pap--atelier:not(.pap--atelier-closed) .pap-stage { display: none; }
  .pap-atelier { flex: 1 1 auto; max-width: 560px; margin: 24px auto; position: static; max-height: none; }
  .pap-atelier-toggle { top: 14px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); padding: 6px 14px; font-size: 12px; }
}

@media (max-width: 520px) {
  .pap-atelier { margin: 0; border-radius: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pap-screen.is-entering,
  .pap-modal[open] { animation: none; }
  .pap-option,
  .pap-button,
  .pap-phone,
  .pap-mode__circle,
  .pap-pill { transition: none; }
}
