/* Pillar page « Comment marche la VEFA ? » — token-driven (--vefa-*).
   Explorateur interactif compact : grande image fixe à gauche (l'immeuble se
   construit), texte de l'étape à droite ; on avance via le stepper (étapes
   cliquables + précédent/suivant + lecture auto). Pas de scroll.
   Dégrade sans JS (6 étapes affichées + immeuble fini) + prefers-reduced-motion. */

.pillar-vefa { color: var(--vefa-text); font-family: var(--ui-font-family); background: var(--vefa-bg); }
.pillar-container { max-width: 1120px; margin: 0 auto; padding: 0 var(--vefa-space-4); }

/* ---- Hero ---- */
.pillar-hero { background: var(--vefa-bg-soft); border-bottom: 1px solid var(--vefa-bg-muted); padding: var(--vefa-space-7) 0 var(--vefa-space-6); }
.pillar-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--vefa-primary-dark); background: #eaf2fb; padding: 5px 14px; border-radius: var(--vefa-radius-pill); }
.pillar-eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vefa-accent); }
.pillar-hero__title { font-family: var(--title-font-family); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: var(--vefa-space-4) 0 var(--vefa-space-3); }
.pillar-hl { color: var(--vefa-accent); }
.pillar-hero__lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); line-height: 1.6; color: var(--vefa-text-muted); max-width: 720px; margin: 0 0 var(--vefa-space-6); }

/* ---- Jauge échéancier (hero, statique) ---- */
.pillar-gauge { background: var(--vefa-bg); border: 1px solid var(--vefa-bg-muted); border-radius: var(--vefa-radius-lg); padding: var(--vefa-space-4) var(--vefa-space-5); box-shadow: var(--vefa-shadow-sm); }
.pillar-gauge__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 500; margin-bottom: var(--vefa-space-4); }
.pillar-gauge__head i { color: var(--vefa-accent); }
.pillar-gauge__legend { font-weight: 400; font-size: 12px; color: var(--vefa-text-subtle); }
.pillar-gauge__track { position: relative; height: 10px; border-radius: var(--vefa-radius-pill); background: var(--vefa-bg-muted); overflow: hidden; }
.pillar-gauge__fill { position: absolute; inset: 0; background: var(--vefa-success); opacity: 0.18; }
.pillar-gauge__tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--vefa-success); }
.pillar-gauge__labels { position: relative; height: 18px; margin-top: 8px; }
.pillar-gauge__labels span { position: absolute; transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: var(--vefa-text-muted); }
.pillar-gauge__labels span:first-child { transform: translateX(0); }
.pillar-gauge__labels span:last-child { transform: translateX(-100%); }

/* ================= Explorateur d'étapes ================= */
.pillar-explorer { padding: var(--vefa-space-7) 0; }
.pillar-explorer__card { background: var(--vefa-bg); border: 1px solid var(--vefa-bg-muted); border-radius: var(--vefa-radius-xl); box-shadow: var(--vefa-shadow-sm); padding: var(--vefa-space-5); }

/* ---- Barre de progression (stepper) ---- */
.pe-bar { display: flex; align-items: center; gap: 10px; margin-bottom: var(--vefa-space-5); }
.pe-nav { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--vefa-bg-muted); background: var(--vefa-bg); color: var(--vefa-text); cursor: pointer; font-size: 14px; transition: border-color var(--vefa-duration-base) var(--vefa-ease), color var(--vefa-duration-base) var(--vefa-ease); }
.pe-nav:hover { border-color: var(--vefa-accent); color: var(--vefa-accent); }
.pe-nav:disabled { opacity: 0.4; cursor: default; }
.pe-steps { list-style: none; display: flex; align-items: stretch; gap: 8px; margin: 0; padding: 4px; flex: 1; overflow-x: auto; scrollbar-width: thin; }
.pe-steps > li { flex: 1 1 0; min-width: max-content; }
.pe-step { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--vefa-bg-muted); border-radius: var(--vefa-radius-pill); background: var(--vefa-bg); color: var(--vefa-text-muted); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; transition: border-color var(--vefa-duration-base) var(--vefa-ease), background var(--vefa-duration-base) var(--vefa-ease), color var(--vefa-duration-base) var(--vefa-ease); }
.pe-step:hover { border-color: var(--vefa-text-subtle); color: var(--vefa-text); }
.pe-step__num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--vefa-bg-muted); color: var(--vefa-text-muted); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pe-step__label i { color: var(--vefa-primary); margin-right: 4px; }
.pe-step.is-done .pe-step__num { background: var(--vefa-primary); color: #fff; }
.pe-step.is-active { border-color: var(--vefa-accent); background: #fff1ec; color: var(--vefa-text); }
.pe-step.is-active .pe-step__num { background: var(--vefa-accent); color: #fff; }

/* ---- Corps : scène + contenu ---- */
.pe-body { display: block; }
.pe-stage { background: var(--vefa-bg-soft); border: 1px solid var(--vefa-bg-muted); border-radius: var(--vefa-radius-lg); padding: var(--vefa-space-5); display: flex; flex-direction: column; align-items: center; }
.pe-illus { width: 100%; display: flex; justify-content: center; }
.pe-illu { width: 100%; max-width: 380px; display: none; }
.pe-illu:first-child { display: block; }
.pe-illu .pillar-svg { width: 100%; height: auto; display: block; border-radius: var(--vefa-radius-md); box-shadow: var(--vefa-shadow-sm); }
.pe-hud { width: 100%; max-width: 360px; margin-top: var(--vefa-space-4); }
.pe-hud__step { text-align: center; font-weight: 500; font-size: 14px; margin-bottom: 10px; color: var(--vefa-text); }
.pe-gauge__track { height: 10px; border-radius: var(--vefa-radius-pill); background: var(--vefa-bg-muted); overflow: hidden; }
.pe-gauge__fill { height: 100%; width: 100%; background: var(--vefa-success); border-radius: var(--vefa-radius-pill); transition: width .6s var(--vefa-ease); }
.pe-gauge__val { text-align: center; font-size: 12px; color: var(--vefa-text-muted); margin-top: 6px; }
.pe-gauge__val strong { color: var(--vefa-text); font-size: 14px; }
.pe-play { display: inline-flex; align-items: center; gap: 8px; margin: var(--vefa-space-4) auto 0; padding: 9px 18px; border: 1px solid var(--vefa-text-subtle); border-radius: var(--vefa-radius-md); background: var(--vefa-bg); color: var(--vefa-text); font-weight: 500; font-size: 14px; cursor: pointer; transition: border-color var(--vefa-duration-base) var(--vefa-ease); }
.pe-play:hover { border-color: var(--vefa-accent); }
.pe-play i { color: var(--vefa-accent); }

/* Illustration par phase (1 visible à la fois quand JS actif) */
.pillar-vefa.js-anim .pe-illu { display: none; }
.pillar-vefa.js-anim .pe-illu.is-active { display: block; }
.pillar-vefa.js-anim .pe-gauge__fill { width: 0; }

/* Panneaux : un seul visible quand JS actif ; tous empilés sans JS (SEO) */
.pe-content { padding-top: var(--vefa-space-4); }
.pillar-vefa.js-anim .pe-content .pillar-phase.is-hidden { display: none; }
.pe-enter { animation: peEnter .4s var(--vefa-ease); }
@keyframes peEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pe-content .pillar-phase + .pillar-phase { margin-top: var(--vefa-space-6); padding-top: var(--vefa-space-6); border-top: 1px solid var(--vefa-bg-muted); }

/* ---- Contenu d'une étape ---- */
.pillar-phase { scroll-margin-top: 90px; }
.pillar-phase__head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--vefa-space-3); }
.pillar-phase__num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--vefa-accent); color: #fff; font-weight: 500; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.pillar-phase__icon { color: var(--vefa-primary); font-size: 20px; }
.pillar-phase__title { font-family: var(--title-font-family); font-size: clamp(1.3rem, 3vw, 1.6rem); line-height: 1.2; margin: 0; }
.pillar-phase__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--vefa-space-3); }
.pillar-phase__fact { font-weight: 500; font-size: 14px; color: var(--vefa-accent); background: #fff1ec; padding: 5px 12px; border-radius: var(--vefa-radius-pill); }
.pillar-phase__fact i { margin-right: 5px; }
.pillar-phase__funds { font-size: 13px; color: var(--vefa-text-muted); padding: 5px 12px; background: var(--vefa-bg-muted); border-radius: var(--vefa-radius-pill); }
.pillar-phase__lede { font-size: 16px; line-height: 1.7; color: var(--vefa-text); margin: 0 0 var(--vefa-space-4); }
.pillar-phase__blind { background: var(--vefa-bg-soft); border-left: 3px solid var(--vefa-primary); border-radius: 0 var(--vefa-radius-md) var(--vefa-radius-md) 0; padding: var(--vefa-space-4); margin-bottom: var(--vefa-space-4); }
.pillar-phase__blind-title { font-weight: 500; font-size: 14px; margin: 0 0 8px; }
.pillar-phase__blind-title i { color: var(--vefa-warning); margin-right: 6px; }
.pillar-phase__blind ul { margin: 0; padding-left: 20px; }
.pillar-phase__blind li { font-size: 14px; line-height: 1.6; color: var(--vefa-text-muted); margin-bottom: 6px; }
.pillar-phase__blind li:last-child { margin-bottom: 0; }
.pillar-phase__footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--vefa-space-3) var(--vefa-space-5); }
.pillar-phase__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pillar-phase__links-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--vefa-text-subtle); font-weight: 500; }
.pillar-phase__article { font-size: 14px; color: var(--vefa-primary-dark); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--vefa-duration-base) var(--vefa-ease); }
.pillar-phase__article:hover { border-color: var(--vefa-primary-dark); }
.pillar-phase__tool { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-weight: 500; font-size: 14px; color: var(--vefa-accent); text-decoration: none; white-space: nowrap; }
.pillar-phase__tool:hover { color: var(--vefa-accent); text-decoration: underline; }

/* ---- FAQ ---- */
.pillar-faq { background: var(--vefa-bg-soft); padding: var(--vefa-space-7) 0; }
.pillar-section-title { font-family: var(--title-font-family); font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 var(--vefa-space-5); }
.pillar-faq__list { display: flex; flex-direction: column; gap: 10px; }
.pillar-faq__item { background: var(--vefa-bg); border: 1px solid var(--vefa-bg-muted); border-radius: var(--vefa-radius-md); padding: var(--vefa-space-4) var(--vefa-space-5); }
.pillar-faq__q { font-weight: 500; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.pillar-faq__q::after { content: "\002B"; color: var(--vefa-accent); font-weight: 400; }
.pillar-faq__item[open] .pillar-faq__q::after { content: "\2212"; }
.pillar-faq__a { margin-top: 12px; font-size: 15px; line-height: 1.7; color: var(--vefa-text-muted); }

/* ---- CTA final ---- */
.pillar-cta { padding: var(--vefa-space-7) 0; text-align: center; }
.pillar-cta__title { font-family: var(--title-font-family); font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 var(--vefa-space-3); }
.pillar-cta__text { color: var(--vefa-text-muted); margin: 0 auto var(--vefa-space-5); max-width: 560px; }
.pillar-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pillar-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: var(--vefa-radius-md); font-weight: 500; font-size: 15px; text-decoration: none; transition: transform var(--vefa-duration-base) var(--vefa-ease), box-shadow var(--vefa-duration-base) var(--vefa-ease); }
.pillar-btn--primary { background: var(--vefa-accent); color: #fff; box-shadow: var(--vefa-shadow-sm); }
.pillar-btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--vefa-shadow-md); }
.pillar-btn--ghost { background: var(--vefa-bg); color: var(--vefa-text); border: 1px solid var(--vefa-text-subtle); }
.pillar-btn--ghost:hover { color: var(--vefa-text); border-color: var(--vefa-text-muted); }

/* ================= Desktop : image fixe à gauche, texte à droite ================= */
@media (min-width: 860px) {
  .pe-body { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: var(--vefa-space-7); align-items: start; }
  .pe-illu { max-width: 100%; }
  .pe-hud { max-width: none; }
  .pe-content { padding-top: 0; }
  .pe-step__label { display: inline; }
}

/* ================= Mobile : scène au-dessus, stepper scrollable ================= */
@media (max-width: 640px) {
  .pillar-gauge__labels { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 6px; }
  .pillar-gauge__labels span { position: static; transform: none; background: var(--vefa-bg-muted); padding: 3px 9px; border-radius: var(--vefa-radius-pill); }
  .pillar-explorer__card { padding: var(--vefa-space-4); }
  .pe-step__label { display: none; }
  .pe-step { padding: 8px; }
  .pe-illu { max-width: 240px; }
}

/* ================= prefers-reduced-motion ================= */
.pillar-vefa.reduce-motion .pe-gauge__fill,
.pillar-vefa.reduce-motion .pe-step,
.pillar-vefa.reduce-motion .pillar-btn { transition: none !important; }
.pillar-vefa.reduce-motion .pe-enter { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .pillar-vefa.js-anim .pe-gauge__fill { transition: none !important; }
  .pe-enter { animation: none !important; }
}
