/* =========================================================
   MES EXPERTISES - SHOWROOM CREATIF (home), refonte v3
   Trois scenes radicalement differentes (plan technique, bureau en
   flat lay, table lumineuse). Le chrome Pixora (pixel font, volt)
   n'habille que les commandes/legendes ; les pieces exposees gardent
   le registre du client (Bodoni Moda / Archivo), definis ici en
   variables locales (n'existent pas ailleurs dans le theme).
   Voir showroom-v3-spike/NOTES.md (racine du projet) pour le detail
   des choix de composition.
   ========================================================= */

.px-showroom {
  --vm-forest: #1D2A25;
  --vm-graphite: #111312;
  --vm-linen: #E9E3D8;
  --vm-stone: #B8B0A2;
  --vm-brass: #9B8562;
  --vm-ivory: #F5F1E9;
  --vm-font-head: 'Bodoni Moda', serif;
  --vm-font-body: 'Archivo', sans-serif;

  overflow-x: clip;
}

.px-showroom__intro {
  padding: 0 6vw var(--space-lg);
  max-width: 1100px;
}
.px-showroom__intro-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, "Cascadia Code", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-volt);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.px-showroom__intro-tag::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--color-volt);
  opacity: 0.7;
}
.px-showroom__intro-line {
  /* Meme traitement que le h2 du labo (A2) : pixel font, pas le corps de texte. */
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: var(--space-sm) 0 var(--space-md);
  color: var(--text-primary);
  max-width: 20ch;
}
.px-showroom__index {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-title);
  font-size: 0.6rem;
  color: var(--text-secondary);
}
.px-showroom__index a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 4px; }
.px-showroom__index a:hover, .px-showroom__index a:focus-visible { color: var(--color-volt); border-color: var(--color-volt); }
.px-showroom__index span { color: var(--text-primary); margin-left: 0.4em; }

.px-scene { position: relative; padding: var(--space-lg) 0 var(--space-xl); }
.px-scene--build { background: #070c1a; }

/* ============== Seams (transitions) ============== */

.px-seam {
  height: 11rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6vw;
}
.px-seam--1 { background: linear-gradient(180deg, #070c1a 0%, var(--color-noir) 100%); }
.px-seam--2 { background: linear-gradient(180deg, var(--color-noir) 0%, #2a2520 55%, #d9d2c3 100%); }
.px-seam--3 { height: 6rem; background: var(--vm-ivory); }
.px-seam span {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 18ch;
  text-align: right;
}
.px-seam--2 span { color: #6b6456; }

/* =========================================================
   SCENE 01 : Le plan de chantier
   ========================================================= */

.px-build {
  display: grid;
  grid-template-columns: minmax(220px, 20%) 1fr;
  gap: 4vw;
  padding: 0 6vw;
  align-items: start;
}

.px-build__title-block { padding-top: var(--space-xs); }

.px-build__title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}
.px-build__dek {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 var(--space-md);
  max-width: 24ch;
}

.px-build__controls { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-sm); }
.px-build__controls button {
  font-family: var(--font-title);
  font-size: 0.55rem;
  padding: 0.65em 0.9em;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.px-build__controls button[aria-pressed="true"] { background: var(--color-volt); border-color: var(--color-volt); color: var(--color-noir); }

.px-build__replay, .px-build__link {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 var(--space-xs);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.px-build__link { color: var(--color-mint); margin-top: var(--space-sm); }
.px-build__link--secondary { color: var(--text-secondary); font-size: 0.75rem; }
.px-build__replay:hover, .px-build__replay:focus-visible,
.px-build__link:hover, .px-build__link:focus-visible { color: var(--color-volt); }

.px-build__ruler {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-hairline);
  padding-left: 0.6rem;
  height: 200px;
  justify-content: space-between;
}
.px-build__ruler span { font-family: var(--font-title); font-size: 0.5rem; color: var(--text-muted); }

.px-build__sheet {
  position: relative;
  border-radius: var(--radius-xs);
  overflow: hidden;
  aspect-ratio: 16/9.2;
  box-shadow: 0 50px 90px -45px rgba(0,0,0,0.65);
  transition: background-color 0.5s;
}
.px-build__sheet-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }

.px-build__zone { position: relative; border: 1px dashed transparent; overflow: hidden; }
.px-build__zone--header { flex: 0 0 64px; }
.px-build__zone--hero { flex: 1 1 auto; }
.px-build__zone--territoire { flex: 0 0 110px; }

.px-build__tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-title);
  font-size: 0.55rem;
  color: rgba(255,255,255,0.65);
  opacity: 0;
  transition: opacity 0.3s;
}
.px-build__dim {
  position: absolute; left: 0; right: 0; bottom: -28px;
  text-align: center;
  font-family: var(--font-title);
  font-size: 0.55rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.3s;
}
.px-build__stamp {
  position: absolute; right: 10px; bottom: 10px;
  font-family: var(--font-title);
  font-size: 0.48rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
  text-align: right;
  z-index: 3;
  transition: color 0.4s;
}
.px-build__sheet[data-scene-state="design"] .px-build__stamp,
.px-build__sheet[data-scene-state="live"] .px-build__stamp { color: rgba(17, 19, 18, 0.45); }

/* --- Etat STRUCTURE : cyanotype --- */
.px-build__sheet[data-scene-state="structure"] { background: #0f2a52; }
.px-build__sheet[data-scene-state="structure"] .px-build__zone { border-color: rgba(255,255,255,0.4); }
.px-build__sheet[data-scene-state="structure"] .px-build__tag { opacity: 1; }
.px-build__sheet[data-scene-state="structure"] .px-build__dim { opacity: 1; }
.px-build__sheet[data-scene-state="structure"]::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 32px);
  pointer-events: none;
  z-index: 2;
}
.px-build__sheet[data-scene-state="structure"] .px-vm-header,
.px-build__sheet[data-scene-state="structure"] .px-vm-hero__photo,
.px-build__sheet[data-scene-state="structure"] .px-vm-hero__shade,
.px-build__sheet[data-scene-state="structure"] .px-vm-hero__word,
.px-build__sheet[data-scene-state="structure"] .px-vm-territoire { opacity: 0; }

/* --- Etat DESIGN / LIVE : papier reel --- */
.px-build__sheet[data-scene-state="design"],
.px-build__sheet[data-scene-state="live"] { background: var(--vm-linen); }

.px-vm-header {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm);
  padding: 0 1.4rem;
  background: var(--vm-forest);
  transition: opacity 0.5s;
  font-family: var(--vm-font-body);
}
.px-vm-header__logo { font-family: var(--vm-font-head); font-style: italic; font-size: 0.95rem; color: var(--vm-linen); }
.px-vm-header__logo em { font-style: normal; }
.px-vm-header__nav { display: none; gap: 1.1rem; font-size: 0.72rem; color: var(--vm-stone); }
.px-vm-header__burger { width: 26px; height: 18px; position: relative; background: none; border: none; cursor: pointer; }
.px-vm-header__burger span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--vm-linen); }
.px-vm-header__burger span:first-child { top: 0; }
.px-vm-header__burger span:last-child { bottom: 0; }
.px-vm-header__cta { font-size: 0.68rem; font-weight: 600; padding: 0.5em 0.9em; border-radius: var(--radius-pill); background: var(--vm-brass); color: var(--vm-graphite); }

.px-vm-burger-panel {
  position: absolute; top: 64px; right: 10px; z-index: 4;
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--vm-forest); padding: 1rem 1.2rem;
  font-family: var(--vm-font-body); font-size: 0.75rem; color: var(--vm-linen);
  border-radius: var(--radius-sm);
}
.px-vm-burger-panel[hidden] { display: none; }

.px-vm-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: opacity 0.5s; }
.px-vm-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,19,18,0) 40%, rgba(17,19,18,0.75) 100%); transition: opacity 0.5s; }
.px-vm-hero__word {
  position: absolute; left: 1.4rem; bottom: 1rem;
  font-family: var(--vm-font-head); font-style: italic;
  font-size: clamp(1rem, 2vw, 1.5rem); line-height: 1.15;
  color: var(--vm-ivory);
  transition: opacity 0.5s;
}

.px-vm-territoire { position: absolute; inset: 0; display: flex; align-items: center; background: var(--vm-ivory); padding: 0 1.4rem; gap: 0.6rem; transition: opacity 0.5s; }
.px-vm-territoire__chip { width: 34px; height: 34px; border-radius: var(--radius-xs); flex: none; }
.px-vm-territoire__label { font-family: var(--vm-font-body); font-size: 0.72rem; color: var(--vm-graphite); margin-left: 0.6rem; }

@media (min-width: 640px) {
  .px-vm-header__nav { display: flex; }
  .px-vm-header__burger { display: none; }
}

@media (max-width: 860px) {
  .px-build { grid-template-columns: 1fr; gap: var(--space-md); padding: 0 6vw; }
  .px-build__ruler { display: none; }
  .px-build__sheet { aspect-ratio: 4/5; }
}

/* =========================================================
   SCENE 02 : Le bureau en flat lay
   ========================================================= */

.px-scene--workshop { background: radial-gradient(120% 90% at 15% 0%, #241f19 0%, #0d0b09 60%); }

.px-workshop { display: grid; grid-template-columns: minmax(230px, 23%) 1fr; gap: 4vw; padding: 0 6vw; align-items: start; }

.px-workshop__tab {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.55rem;
  color: #d8cdbb;
  border: 1px dashed rgba(216, 205, 187, 0.4);
  padding: 0.4em 0.6em;
  margin-bottom: var(--space-sm);
}

.px-workshop__title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
  color: #f1ebe0;
}
.px-workshop__dek { font-size: 0.9rem; color: #a79c89; line-height: 1.5; margin: 0 0 var(--space-md); max-width: 26ch; }

.px-workshop__specimen {
  background: var(--vm-linen);
  color: var(--vm-graphite);
  padding: 1.3rem 1.3rem 1.5rem;
  transform: rotate(-1deg);
  box-shadow: 8px 14px 26px -12px rgba(0,0,0,0.5);
  max-width: 230px;
  margin-bottom: var(--space-sm);
}
.px-workshop__specimen-fonts { display: block; font-family: var(--vm-font-head); font-style: italic; font-size: 1rem; margin-bottom: 0.5rem; }
.px-workshop__specimen-copy { font-family: var(--vm-font-body); font-size: 0.78rem; line-height: 1.5; margin: 0 0 var(--space-sm); color: #4a4138; }
.px-workshop__pucks { display: flex; gap: 0.4rem; }
.px-workshop__pucks span { width: 20px; height: 20px; border-radius: 50%; display: block; border: 1px solid rgba(0,0,0,0.15); }

.px-workshop__desk { position: relative; height: 580px; }
.px-workshop__triangle {
  position: absolute; top: 4%; right: 6%; width: 90px; height: 140px;
  background: rgba(216, 205, 187, 0.08);
  clip-path: polygon(0 100%, 100% 100%, 0 0);
  border: 1px solid rgba(216, 205, 187, 0.18);
  z-index: 0;
}

.px-workshop__board { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }

.px-plate {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: top 0.6s cubic-bezier(.16,1,.3,1), left 0.6s cubic-bezier(.16,1,.3,1),
              right 0.6s cubic-bezier(.16,1,.3,1), width 0.6s cubic-bezier(.16,1,.3,1),
              transform 0.6s cubic-bezier(.16,1,.3,1), box-shadow 0.4s;
}
.px-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.px-plate:focus-visible { outline: 2px solid var(--color-volt); outline-offset: 3px; }

.px-plate--bleu { aspect-ratio: 937/1000; }
.px-plate--marron { aspect-ratio: 1100/733; }
.px-plate--vert { aspect-ratio: 952/1000; }

.px-plate[data-role="front"] { top: 9%; left: 28%; right: auto; width: 49%; transform: rotate(-1deg); z-index: 3; box-shadow: 10px 22px 40px -16px rgba(0,0,0,0.65); }
.px-plate[data-role="a"] { top: 4%; left: 0; right: auto; width: 28%; transform: rotate(-7deg); z-index: 1; box-shadow: 4px 10px 20px -10px rgba(0,0,0,0.6); }
.px-plate[data-role="b"] { top: 56%; left: auto; right: 1%; width: 32%; transform: rotate(5deg); z-index: 1; box-shadow: 4px 10px 20px -10px rgba(0,0,0,0.6); }

.px-plate__mark {
  position: absolute; bottom: 14px; left: 14px;
  font-family: var(--vm-font-head); font-style: italic; font-size: 1rem;
  color: var(--vm-ivory);
  text-decoration: underline wavy rgba(197, 241, 53, 0.8);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 860px) {
  .px-workshop { grid-template-columns: 1fr; gap: var(--space-md); padding: 0 6vw; }
  .px-workshop__specimen { transform: none; max-width: none; }
  .px-workshop__triangle { display: none; }
  .px-workshop__desk { height: auto; }
  .px-workshop__board { position: static; display: flex; gap: var(--space-sm); overflow-x: auto; scroll-snap-type: x mandatory; height: 420px; padding-bottom: 0.5rem; }
  .px-plate, .px-plate[data-role="front"], .px-plate[data-role="a"], .px-plate[data-role="b"] {
    position: static; flex: 0 0 78%; height: 100%; width: auto; aspect-ratio: auto; transform: none; scroll-snap-align: center;
  }
}

/* =========================================================
   SCENE 03 : La table lumineuse
   ========================================================= */

.px-scene--reveal { background: var(--vm-ivory); color: var(--vm-graphite); }

.px-reveal { display: grid; grid-template-columns: 1fr minmax(210px, 23%); gap: 4vw; padding: 0 6vw; align-items: center; min-height: 600px; }

.px-reveal__stage { position: relative; height: 560px; display: flex; align-items: center; justify-content: center; }

.px-reveal__symbol { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(380px, 60%); height: auto; }
.px-reveal__symbol[hidden] { display: none; }
.px-reveal__path { stroke: var(--vm-graphite); stroke-width: 2.2; fill: none; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s cubic-bezier(.16,1,.3,1); }
.px-reveal__path:nth-child(2) { transition-delay: 0.15s; }

/* height:auto obligatoire : sans ca, l'attribut HTML height="626" l'emporte en
   hint presentationnel (rien ne le neutralise sinon) et ecrase l'image sur sa
   hauteur native brute au lieu de suivre le ratio avec la largeur. */
.px-reveal__wordmark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, 62%); height: auto; }
.px-reveal__wordmark[hidden] { display: none; }

.px-reveal__system { position: absolute; top: 78%; left: 50%; transform: translate(-50%, -50%); align-items: center; gap: 1.4rem; }
.px-reveal__system[hidden] { display: none; }
.px-reveal__system:not([hidden]) { display: flex; }
.px-reveal__system-swatches { display: flex; gap: 0.5rem; }
.px-reveal__system-swatches span { width: 46px; height: 46px; border-radius: var(--radius-xs); display: block; }
.px-reveal__system-specimen { font-family: var(--vm-font-head); font-style: italic; font-size: 1.3rem; line-height: 1.3; margin: 0; color: var(--vm-graphite); }
.px-reveal__system-specimen span { font-family: var(--vm-font-body); font-style: normal; font-size: 0.8rem; color: #6b6456; display: block; }

.px-reveal__card-frame {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  clip-path: inset(44% round 6px);
  opacity: 0;
  transition: clip-path 0.9s cubic-bezier(.16,1,.3,1), opacity 0.5s, transform 0.9s cubic-bezier(.16,1,.3,1);
}
.px-reveal__card-frame img { width: min(480px, 68%); height: auto; border-radius: var(--radius-sm); box-shadow: 0 30px 60px -24px rgba(17, 19, 18, 0.4); }

.px-reveal__gallery-extra { position: absolute; left: 4%; bottom: 6%; align-items: center; gap: 0.6rem; }
.px-reveal__gallery-extra[hidden] { display: none; }
.px-reveal__gallery-extra:not([hidden]) { display: flex; }
.px-reveal__gallery-chip { width: 30px; height: 30px; border-radius: var(--radius-xs); }
.px-reveal__gallery-type { font-family: var(--vm-font-head); font-style: italic; font-size: 0.9rem; margin: 0; color: var(--vm-graphite); }

.px-scene--reveal[data-step="0"] .px-reveal__path,
.px-scene--reveal[data-step="1"] .px-reveal__path,
.px-scene--reveal[data-step="2"] .px-reveal__path,
.px-scene--reveal[data-step="3"] .px-reveal__path,
.px-scene--reveal[data-step="4"] .px-reveal__path { stroke-dashoffset: 0; }

.px-scene--reveal[data-step="3"] .px-reveal__card-frame,
.px-scene--reveal[data-step="4"] .px-reveal__card-frame { clip-path: inset(0% round 6px); opacity: 1; }
/* Decale vers la droite (pas la gauche) : la legende "Bodoni Moda" est ancree
   en bas a gauche (.px-reveal__gallery-extra, left:4%) ; un decalage negatif
   ramenait justement la carte par-dessus elle. */
.px-scene--reveal[data-step="4"] .px-reveal__card-frame { transform: translateX(9%) scale(0.94); }

.px-reveal__symbol, .px-reveal__wordmark, .px-reveal__system, .px-reveal__gallery-extra { animation: px-reveal-in 0.4s ease both; }
@keyframes px-reveal-in { from { opacity: 0; } to { opacity: 1; } }

.px-reveal__card-frame.is-sweeping::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.55) 50%, transparent 60%);
  animation: px-sweep 0.7s ease-out;
  pointer-events: none;
}
@keyframes px-sweep {
  from { transform: translateX(-60%); opacity: 0; }
  30% { opacity: 1; }
  to { transform: translateX(60%); opacity: 0; }
}

.px-reveal__rail { display: flex; flex-direction: column; gap: 0.1rem; border-left: 1px solid rgba(17,19,18,0.15); padding-left: var(--space-sm); }
.px-reveal__rail button[role="tab"] {
  display: flex; align-items: baseline; gap: 0.6rem;
  background: none; border: none; text-align: left;
  padding: 0.6rem 0;
  font-family: var(--vm-font-body); font-size: 0.78rem; color: #8f8575;
  border-bottom: 1px solid rgba(17,19,18,0.08);
  cursor: pointer;
}
.px-reveal__rail button[role="tab"] b { font-family: var(--font-title); font-size: 0.5rem; color: #b2a890; }
.px-reveal__rail button[aria-selected="true"] { color: var(--vm-graphite); }
.px-reveal__rail button[aria-selected="true"] b { color: var(--color-volt); }
.px-reveal__rail button:focus-visible { outline: 2px solid var(--vm-brass); outline-offset: 2px; }

.px-reveal__replay, .px-reveal__link {
  display: block;
  margin-top: var(--space-sm);
  background: none; border: none;
  font-family: var(--font-body); font-size: 0.78rem; color: #6b6456;
  padding: 0; text-align: left; text-decoration: none; cursor: pointer;
}
.px-reveal__replay:hover, .px-reveal__replay:focus-visible,
.px-reveal__link:hover, .px-reveal__link:focus-visible { color: var(--vm-graphite); }

@media (max-width: 860px) {
  .px-reveal { grid-template-columns: 1fr; gap: var(--space-sm); padding: 0 6vw; min-height: 0; }
  .px-reveal__stage { min-height: 420px; height: auto; order: 2; }
  .px-reveal__rail { order: 1; flex-direction: row; flex-wrap: wrap; overflow-x: auto; border-left: none; padding-left: 0; gap: var(--space-sm); border-bottom: 1px solid rgba(17,19,18,0.15); padding-bottom: 0.6rem; }
  .px-reveal__rail button[role="tab"] { flex: none; border-bottom: none; flex-direction: column; gap: 0.2rem; }
  .px-reveal__replay, .px-reveal__link { order: 3; }
}

/* ============== Accessibilite ============== */
@media (prefers-reduced-motion: reduce) {
  .px-plate,
  .px-build__sheet,
  .px-vm-hero__photo, .px-vm-hero__shade, .px-vm-hero__word, .px-vm-header, .px-vm-territoire,
  .px-reveal__path, .px-reveal__card-frame {
    transition-duration: 0.001ms !important;
  }
  .px-reveal__symbol, .px-reveal__wordmark, .px-reveal__system, .px-reveal__gallery-extra { animation: none; }
  .px-reveal__card-frame.is-sweeping::after { display: none; }
}
