/* 04 — Mon projet : configurateur en 4 étapes.
   Principe repris du handoff « MON-PROJECT » (fenêtre fixe, piste qui glisse, cartes inversées à la sélection),
   habillé avec la palette Pantone : fenêtre crème un ton plus sombre que la page (relief léger), accents bleu et orange. */
.mp {
  --mp-ease: cubic-bezier(0.77, 0, 0.18, 1);
  --mp-dur: 900ms;
  --mp-on-lava: var(--on-red);
  --mp-line: var(--line);
  padding-top: var(--section-y); /* même espacement que les autres sections (plus de coulure au-dessus) */
}
.mp__window, .mp__window * { box-sizing: border-box; }

/* Libellés : style « kicker » du site */
.mp__mono { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.mp__label, .mp__tag, .mp__code, .mp__total-label, .mp__step-num {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
/* Titres et montants : Syncopate, comme les grands titres du site */
.mp__num, .mp__h3, .mp__feat-name, .mp__lang-name, .mp__total-value, .mp__grand-value, .mp__sent-title {
  font-family: var(--font-display); letter-spacing: var(--display-track); font-weight: var(--display-weight); text-transform: uppercase;
}
.mp__num, .mp__total-value, .mp__grand-value {
  background: var(--lava-v); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums; padding-top: 0.04em;
}

/* ---------- Fenêtre ---------- */
.mp__window {
  --step: 0;
  /* Teinte du cadre : le crème du fond, ~12 % plus sombre (1,12:1 avec la page). Contrastes vérifiés :
     texte 13,7:1 · texte secondaire 8:1 · gris 4,55:1 · orange texte 4,67:1 (AA). */
  --mp-surface: #F2EFCF;
  --mp-panel: #FAF8E9;     /* carte intérieure : entre le cadre et la page, elle remonte vers l'avant */
  position: relative;
  max-width: calc(var(--maxw) - 2 * var(--gutter)); margin: 0 auto;
  width: calc(100% - 2 * var(--gutter));
  /* hauteur = celle de l'étape affichée (voir js/components/mp-height.js), plus de hauteur minimale imposée */
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--mp-surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 30px 60px -42px rgba(5, 25, 80, 0.22); /* profondeur légère */
}
.mp__window::before { content: ''; position: absolute; z-index: 1; left: 32px; right: 32px; top: 0; height: 1px; background: var(--lava); }

/* ---------- Barre du haut : étapes + total ---------- */
.mp__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: clamp(16px, 2vw, 24px) clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--mp-line);
}
.mp__steps { display: flex; gap: 6px; flex: 1 1 420px; min-width: 0; }
.mp__steps li { flex: 1 1 0; min-width: 0; }
.mp__steps button {
  width: 100%; min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 10px;
  text-align: left; color: var(--ink); cursor: default;
}
.mp__steps .is-past button:not(:disabled) { cursor: pointer; }
.mp__fill { position: relative; display: block; height: 3px; width: 100%; border-radius: 2px; background: var(--line); overflow: hidden; }
.mp__fill::after { content: ''; position: absolute; inset: 0; background: var(--lava); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--mp-ease); }
.mp__steps .is-filled .mp__fill::after { transform: scaleX(1); }
.mp__step-txt { display: flex; gap: 8px; align-items: baseline; min-width: 0; opacity: 0.4; transition: opacity 0.4s; }
.mp__steps .is-past .mp__step-txt { opacity: 0.7; }
.mp__steps button[aria-current] .mp__step-txt, .mp__steps .is-past button:hover .mp__step-txt { opacity: 1; }
.mp__steps button[aria-current] .mp__step-num { color: var(--neon); }
.mp__step-num { color: var(--ink); letter-spacing: 0.1em; }
.mp__step-label { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mp__total { display: flex; align-items: baseline; gap: 12px; }
.mp__total-value { display: inline-block; font-size: clamp(1.15rem, 0.9rem + 0.8vw, 1.6rem); line-height: 1; }
.mp__total-value.is-bump { animation: mp-bump 450ms var(--mp-ease); }
@keyframes mp-bump { 40% { transform: translateY(-3px) scale(1.04); } }

/* ---------- Scène + piste ---------- */
.mp__stage { position: relative; flex: none; display: flex; min-width: 0; min-height: 0; overflow: hidden; overflow: clip; transition: height var(--mp-dur) var(--mp-ease); }
.mp__track {
  display: flex; align-items: flex-start; width: 100%; /* chaque étape garde sa hauteur naturelle */
  transform: translateX(calc(var(--step) * -100%));
  transition: transform var(--mp-dur) var(--mp-ease);
  will-change: transform;
}
.mp__panel {
  flex: 0 0 100%; min-width: 0; display: flex;
  padding: clamp(12px, 2.6vw, 36px);
  opacity: 0.35; transform: scale(0.94);
  transition: opacity var(--mp-dur), transform var(--mp-dur) var(--mp-ease);
}
.mp__panel.is-active { opacity: 1; transform: none; }

.mp__card {
  position: relative; flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: clamp(24px, 3vw, 40px);
  padding: clamp(24px, 4vw, 56px);
  background: linear-gradient(180deg, var(--mp-panel), var(--bg) 90%);
  border: 1px solid var(--mp-line);
  border-radius: var(--radius);
}
.mp__card--split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(24px, 4vw, 64px); }
.mp__panel:first-child .mp__card--split { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.mp__col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mp__col--end { justify-content: flex-end; }

/* Numéros d'étape : bleu Magnetic, comme les titres et le total (accents : bleu et orange) */
.mp__num { font-size: clamp(2.8rem, 1.1rem + 5vw, 5.5rem); line-height: 0.9; background: none; color: var(--blue); }
.mp__h3 { font-size: clamp(1.3rem, 0.85rem + 1.5vw, 2.1rem); line-height: 1.05; letter-spacing: 0.01em; text-wrap: balance; }
.mp__h3:focus { outline: none; }
.mp__text { font-size: var(--fs-md); line-height: 1.55; color: var(--ink-2); max-width: 420px; text-wrap: pretty; }
.mp__muted { font-size: var(--fs-sm); color: var(--muted); }
.mp__intro { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; }
.mp__intro-txt { display: flex; flex-direction: column; gap: 10px; flex: 1 1 320px; }
.mp__intro .mp__text { max-width: none; }

.mp__base { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 16px; }
.mp__pill { font-size: var(--fs-sm); font-weight: 600; padding: 0.45em 1em; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--ink); }

/* ---------- Champs ---------- */
.mp__field { display: flex; flex-direction: column; gap: 10px; }
.mp__input {
  width: 100%; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 18px;
  font: inherit; font-size: 1rem; line-height: 1.5;
  transition: border-color var(--t-micro), box-shadow var(--t-micro);
}
.mp__input::placeholder { color: var(--muted); }
.mp__input:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.mp__input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 30%, transparent); }
.mp__textarea { min-height: 180px; resize: vertical; border-radius: var(--r-sm); }

/* ---------- Photos ---------- */
.mp__photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-radius: var(--r-sm); }
.mp__photos.is-drag { outline: 2px dashed var(--orange); outline-offset: 4px; }
.mp__photo { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--bg); animation: mp-in 0.4s var(--mp-ease) both; }
.mp__photo img { width: 100%; height: 100%; object-fit: cover; }
.mp__photo-x {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--ink); font-size: 14px; line-height: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color var(--t-micro);
}
.mp__photo-x::after { content: ''; position: absolute; inset: -8px; }
.mp__photo-x:hover { background: var(--orange); color: var(--on-orange); }
.mp__add {
  aspect-ratio: 1; border-radius: var(--r-sm); border: 1px dashed var(--line-strong);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--orange) 8%, transparent) 0 8px, transparent 8px 16px);
  color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: border-color var(--t-micro), color var(--t-micro);
}
.mp__add > span:first-child { font-size: 24px; line-height: 1; font-weight: 400; }
.mp__add .mp__mono { font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.mp__add:hover { border-color: var(--orange); color: var(--ink); }
@keyframes mp-in { from { opacity: 0; transform: scale(0.94); } }

/* ---------- Boutons (mêmes codes que .btn--lava / .btn--line du site) ---------- */
.mp__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mp__foot--end { margin-top: auto; justify-content: flex-end; padding-top: 8px; }
.mp__hint { font-size: var(--fs-sm); color: var(--muted); }
.mp__hint[hidden] { display: none; }
.mp__btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px;
  padding: 1.05em 1.75em; border-radius: var(--r-pill);
  background: var(--lava); color: var(--mp-on-lava);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
  transition: transform var(--t-micro) var(--ease), opacity var(--t-micro), background-color var(--t-micro);
}
.mp__btn:hover:not(:disabled) { transform: translateX(4px); background: var(--orange-hover); }
.mp__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mp__btn--ghost { background: none; color: var(--ink); border: 1px solid var(--line-strong); font-weight: 600; }
.mp__btn--ghost:hover:not(:disabled) { transform: none; box-shadow: none; border-color: var(--orange); background: none; }

/* ---------- Cartes sélectionnables (étapes 2 et 3) : sélection = carte en lave ---------- */
.mp__row { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 8px; }
.mp__row--base { align-items: baseline; }
.mp__check {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor;
  display: grid; place-items: center; font-size: 13px; line-height: 1;
}
[aria-pressed="true"] .mp__check::after { content: '✓'; }
.mp__feats { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); grid-auto-rows: 1fr; gap: 16px; }
.mp__feat, .mp__lang {
  position: relative; display: flex; flex-direction: column; text-align: left; isolation: isolate; overflow: hidden;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong);
  transition: border-color 0.35s, color 0.35s, transform 0.25s var(--ease), box-shadow 0.35s;
}
/* le fond lave apparaît en fondu (un dégradé ne se transitionne pas directement) */
.mp__feat::before, .mp__lang::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--lava); opacity: 0; transition: opacity 0.35s; }
.mp__feat[aria-pressed="true"], .mp__lang[aria-pressed="true"] { border-color: transparent; color: var(--mp-on-lava); }
.mp__feat[aria-pressed="true"]::before, .mp__lang[aria-pressed="true"]::before { opacity: 1; }
.mp__feat[aria-pressed="true"] .mp__tag, .mp__lang[aria-pressed="true"] .mp__code { color: inherit; }
.mp__feat:hover, .mp__lang:hover { border-color: color-mix(in srgb, var(--ink) 45%, transparent); }
.mp__feat { gap: 20px; min-height: 360px; padding: clamp(22px, 2.4vw, 32px); border-radius: var(--r-sm); }
.mp__feat:hover { transform: translateY(-4px); }
.mp__tag { opacity: 0.85; }
.mp__feat-name { font-size: clamp(1rem, 0.7rem + 0.8vw, 1.4rem); line-height: 1.1; text-wrap: balance; }
.mp__feat-desc { font-size: 15px; line-height: 1.5; opacity: 0.8; text-wrap: pretty; }
.mp__feat-points { display: grid; align-content: start; gap: 0.7rem; font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.mp__feat-points > span { display: block; padding-left: 0.9rem; position: relative; opacity: 0.85; }
.mp__feat-points > span::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.mp__feat-points strong { font-weight: 700; opacity: 1; }
/* Cases côte à côte : étiquette, titre, description et prix alignés d'une case à l'autre */
@media (min-width: 600px) and (max-width: 1099px) {
  .mp__feat-name { min-height: calc(2 * 1.1em); }   /* titres sur 2 lignes : descriptions au même niveau */
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1100px) {
    .mp__feats { grid-auto-rows: auto; }
    .mp__feat { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 20px; min-height: 0; }
    .mp__feat-price { margin-top: 0; align-self: end; }
  }
}
.mp__feat-price { margin-top: auto; font-size: var(--fs-md); font-weight: 600; }
/* Photoshoot : une seule case, à la largeur d'une case de fonctionnalité */
.mp__feats--single { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.mp__langs { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); grid-auto-rows: minmax(120px, 1fr); gap: 12px; align-content: start; }
.mp__lang { justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: var(--r-sm); }
.mp__lang:hover { transform: translateY(-3px); }
.mp__lang .mp__check { width: 22px; height: 22px; font-size: 11px; }
.mp__lang .mp__row--base { flex-direction: column; align-items: flex-start; gap: 6px; }
.mp__lang-name { font-size: 1rem; line-height: 1.1; overflow-wrap: anywhere; }
.mp__lang-price { font-size: var(--fs-sm); opacity: 0.8; white-space: nowrap; }

/* ---------- Étape 4 : devis ---------- */
.mp__lines { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mp__lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mp__lines .mp__mono { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.mp__line-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--fs-md); }
.mp__line-txt small { font-size: 13px; color: var(--muted); }
.mp__grand { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 8px; }
.mp__grand-value { font-size: clamp(2rem, 1.1rem + 2.2vw, 3.1rem); line-height: 1; }
.mp__vat { margin-top: 10px; text-align: right; font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.02em; }

/* Étape 4 : récapitulatif | coordonnées, puis total | envoi sur la même ligne en bas */
.mp__quote {
  display: grid; gap: clamp(20px, 2.5vw, 32px) clamp(24px, 4vw, 64px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "recap" "form" "total" "send";
  align-content: start;
}
.mp__q-recap { grid-area: recap; }
.mp__q-form { grid-area: form; }
.mp__q-total { grid-area: total; align-self: start; }
.mp__q-send { grid-area: send; align-self: start; gap: 0; }
.mp__q-sent { grid-area: form / form / send / send; align-self: end; }
.mp__q-total .mp__grand { min-height: 76px; align-items: center; padding-top: 0; border-top: 1px solid var(--line); }
.mp__q-send .mp__send { margin-top: 0; min-height: 76px; }
@media (min-width: 900px) {
  .mp__quote {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr auto;
    grid-template-areas: "recap form" "total send";
    align-content: stretch;
  }
  .mp__q-form { align-self: end; }
  .mp__q-sent { grid-area: 1 / 2 / 3 / 3; }
}
.mp__demo {
  padding: 0.9rem 1.1rem; border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--orange) 40%, transparent); border-left: 3px solid var(--orange);
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  font-size: var(--fs-sm); line-height: 1.55; color: var(--ink); text-wrap: pretty;
}

.mp__contact { display: flex; flex-direction: column; gap: 16px; }
.mp__contact[hidden] { display: none; }
.mp__error { font-size: var(--fs-sm); line-height: 1.45; color: var(--orange-text); padding: 0.8rem 1rem; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--orange) 55%, transparent); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.mp__error:empty { display: none; }
.mp__send {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 26px 32px; border-radius: var(--r-sm);
  background: var(--lava); color: var(--mp-on-lava);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); font-weight: 700; line-height: 1.1; text-align: left;
  transition: transform var(--t-micro) var(--ease), opacity var(--t-micro), box-shadow var(--t-ui) var(--ease);
}
.mp__send > span[aria-hidden] { font-size: 24px; }
.mp__send:hover:not(:disabled) { transform: translateY(-2px); background: var(--orange-hover); }
.mp__send:disabled { opacity: 0.35; cursor: not-allowed; }
.mp__send[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.mp__spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: mp-spin 0.7s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp__link { align-self: flex-start; min-height: 44px; padding: 12px 0; color: var(--muted); font-size: var(--fs-sm); transition: color var(--t-micro); }
.mp__link:hover { color: var(--ink); }

.mp__sent {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px;
  border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--orange) 50%, transparent);
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--orange) 20%, transparent), transparent 70%), var(--bg-2);
  animation: mp-in 0.5s var(--mp-ease) both;
}
.mp__sent[hidden] { display: none; }
.mp__sent:focus { outline: none; }
.mp__sent-mark { width: 48px; height: 48px; border-radius: 50%; background: var(--lava); color: var(--mp-on-lava); display: grid; place-items: center; font-size: 22px; }
.mp__sent-title { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.7rem); line-height: 1.05; }

/* ---------- Mouvement réduit : fondu court au lieu du glissement ---------- */
@media (prefers-reduced-motion: reduce) {
  .mp__track { transition: none !important; }
  .mp__panel { transform: none; }
  .mp__panel.is-active { animation: mp-fade 200ms ease both !important; }
}
@keyframes mp-fade { from { opacity: 0; } }

/* Une colonne : la pastille de prix suit le texte au lieu d'être poussée en bas */
@media (max-width: 860px) {
  .mp__base { margin-top: 0; padding-top: 0; }
  .mp__card--split { align-content: start; }
  .mp__col--end { justify-content: flex-start; }
}
/* Mobile : fenêtre plus large, place pour la barre d'onglets */
@media (max-width: 899px) {
  .mp { padding-bottom: calc(var(--tabbar-h, 0px) + 40px); }
}
@media (max-width: 599px) {
  .mp__window { width: calc(100% - 24px); }
}

/* Mobile et tablette : l'étape en cours s'élargit et affiche son nom en entier ; les autres gardent leur numéro */
@media (max-width: 959px) {
  .mp__steps li { flex: 1 1 0; transition: flex-grow 0.6s var(--mp-ease); }
  .mp__steps li:has(button[aria-current]) { flex-grow: 4; }
  .mp__steps li:not(:has(button[aria-current])) .mp__step-label { display: none; }
}
