/* Fonctionnement : les couches du manifeste s'empilent au fil du récit, puis se referment en un seul fichier. */

/* ---------- Scène : empilement des couches ---------- */

.hw-board {
  position: relative;
  width: 320px;
  height: 214px;
  margin-right: 170px;
  transform: translateY(70px) rotateX(58deg) rotateZ(-36deg);
  transform-style: preserve-3d;
}

.hw-cmp,
.hw-ly {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.hw-ly1 { transform: translateZ(0); }
.hw-ly2 { transform: translateZ(75px); }
.hw-ly3 { transform: translateZ(150px); }
.hw-ly4 { transform: translateZ(225px); }

.hw-face {
  position: absolute;
  inset: 0;
}

.hw-photo {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 46px 70px -24px rgba(0, 0, 0, 0.7);
}

.hw-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hw-tint {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 220, 200, 0.75);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 140, 60, 0.35), rgba(120, 30, 90, 0.25));
}

.hw-ai {
  position: absolute;
  top: 24px;
  left: 30px;
  width: 140px;
  height: 78px;
  border: 2px dashed #ffe0c8;
  border-radius: 10px;
  background: rgba(255, 230, 210, 0.08);
}

.hw-ai svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hw-glass {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.12));
}

.hw-seal {
  position: absolute;
  top: -26px;
  right: -26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--ps-orange), 0 14px 30px -6px rgba(244, 81, 30, 0.7);
}

.hw-seal img {
  width: 48px;
  height: 48px;
}

/* Étiquettes : contre-rotation de la scène pour rester lisibles. */
.hw-label {
  top: 0;
  left: 100%;
  transform: rotateZ(36deg) rotateX(-58deg);
}

/* Journal du manifeste : indentation sans espaces dans le texte (traduction par nœud). */
.f-tick .hw-i1 { padding-left: 2ch; }
.f-tick .hw-i2 { padding-left: 4ch; }

.f-tick .hw-tick-ok {
  margin-top: 6px;
  color: var(--ps-status-trusted);
}

@keyframes hw-in1 { from { transform: translateZ(0) scale(0.85); } to { transform: translateZ(0); } }
@keyframes hw-in2 { from { transform: translateZ(420px); } to { transform: translateZ(75px); } }
@keyframes hw-in3 { from { transform: translateZ(500px); } to { transform: translateZ(150px); } }
@keyframes hw-in4 { from { transform: translateZ(580px); } to { transform: translateZ(225px); } }
@keyframes hw-c2 { from { transform: translateZ(0); } to { transform: translateZ(-71px); } }
@keyframes hw-c3 { from { transform: translateZ(0); } to { transform: translateZ(-142px); } }
@keyframes hw-c4 { from { transform: translateZ(0); } to { transform: translateZ(-217px); } }
@keyframes hw-seal { from { opacity: 0; transform: scale(2.4); } to { opacity: 1; transform: none; } }

/* Chaque étape ajoute sa couche ; la dernière les referme en un seul fichier.
   Plages courtes : la couche est en place dès que l'étape entre à l'écran. */
@supports (animation-timeline: view()) {
  .hw-ly1 { animation: hw-in1 linear both; animation-timeline: --s1; animation-range: entry 0% entry 45%; }
  .hw-ly2 { animation: hw-in2 linear both; animation-timeline: --s2; animation-range: entry 0% entry 45%; }
  .hw-ly3 { animation: hw-in3 linear both; animation-timeline: --s3; animation-range: entry 0% entry 45%; }
  .hw-ly4 { animation: hw-in4 linear both; animation-timeline: --s4; animation-range: entry 0% entry 45%; }
  .hw-fc1 { animation: f-op linear both; animation-timeline: --s1; animation-range: entry 0% entry 30%; }
  .hw-fc2 { animation: f-op linear both; animation-timeline: --s2; animation-range: entry 0% entry 30%; }
  .hw-fc3 { animation: f-op linear both; animation-timeline: --s3; animation-range: entry 0% entry 30%; }
  .hw-fc4 { animation: f-op linear both; animation-timeline: --s4; animation-range: entry 0% entry 30%; }
  .hw-lb1 { animation: f-op linear both; animation-timeline: --s1; animation-range: entry 35% entry 55%; }
  .hw-lb2 { animation: f-op linear both; animation-timeline: --s2; animation-range: entry 35% entry 55%; }
  .hw-lb3 { animation: f-op linear both; animation-timeline: --s3; animation-range: entry 35% entry 55%; }
  .hw-lb4 { animation: f-op linear both; animation-timeline: --s4; animation-range: entry 35% entry 55%; }
  .hw-seal { animation: hw-seal linear both; animation-timeline: --s4; animation-range: entry 35% entry 55%; }
  .hw-cmp2 { animation: hw-c2 linear both; animation-timeline: --s5; animation-range: entry 10% entry 50%; }
  .hw-cmp3 { animation: hw-c3 linear both; animation-timeline: --s5; animation-range: entry 10% entry 50%; }
  .hw-cmp4 { animation: hw-c4 linear both; animation-timeline: --s5; animation-range: entry 10% entry 50%; }
  .hw-lbo { animation: f-op linear both reverse; animation-timeline: --s5; animation-range: entry 0% entry 20%; }
  .f-tick .hw-tick-ok { animation: f-op linear both; animation-timeline: --s5; animation-range: entry 40% entry 60%; }

  /* Repères partagés du récit (product.css), accélérés comme les apparitions .ps-rev. */
  .f-step .f-node { animation-range: entry 0% entry 30%; }
  .f-step .f-num { animation-range: entry 0% entry 30%; }
  .f-t1, .f-t2, .f-t3, .f-t4, .f-t5 { animation-range: entry 0% entry 40%; }
}

/* ---------- Étapes du récit ---------- */

/* Les quatre étapes sont une vraie suite (création, retouche, IA, sceau) : numéros gardés, mais discrets, en Satoshi. */
.ps-page main .f-step .f-num {
  color: var(--ps-orange-light);
  font-family: var(--ps-font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  -webkit-text-stroke: 0;
}

/* Repère technique de l'étape : pastille teintée plutôt qu'un trait latéral. */
.ps-page main .f-step-tag {
  align-self: flex-start;
  padding: 6px 12px;
  border-left: 0;
  border-radius: var(--ps-radius-pill);
  background: rgba(255, 138, 76, 0.12);
  color: var(--ps-peach);
  font-size: 14px;
}

.ps-page main .f-step p {
  font-size: var(--ps-lead-size);
  line-height: 1.55;
  color: #d7c3b8;
}

/* Journal du manifeste : du vrai JSON, donc en mono. */
.ps-page main .f-tick {
  --ps-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--ps-font-mono);
}

/* ---------- Sous le capot : manifeste annoté ---------- */

.hw-bp {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}

/* Éditeur de code sombre : numéros de ligne, repères 1 à 5, coloration JSON. */
.hw-codebox {
  overflow: hidden;
  border: 1px solid rgba(255, 138, 76, 0.25);
  border-radius: 16px;
  background: var(--ps-ink);
  box-shadow: 0 40px 70px -40px rgba(28, 17, 11, 0.7);
  color: #e9d8ce;
  font-family: var(--ps-font-mono);
  font-size: 14px;
  line-height: 1.8;
}

.hw-codebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 138, 76, 0.15);
  background: #160d08;
}

.hw-dots {
  display: flex;
  gap: 6px;
}

.hw-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a2419;
}

.hw-file {
  padding: 4px 12px;
  border-radius: 8px 8px 0 0;
  background: var(--ps-ink);
  box-shadow: inset 0 2px 0 var(--ps-orange-light);
  color: #fff;
  font-size: 12px;
}

.hw-lang {
  margin-left: auto;
  color: var(--ps-faint-dark);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.hw-code {
  padding: 14px 0 18px;
  counter-reset: hw-line;
}

.hw-cl {
  display: grid;
  grid-template-columns: 44px 30px minmax(0, 1fr);
  align-items: center;
  counter-increment: hw-line;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.hw-ln::before {
  content: counter(hw-line);
  display: block;
  padding-right: 12px;
  color: #5f4a3f;
  font-size: 12px;
  text-align: right;
}

.hw-gut {
  display: flex;
  justify-content: center;
}

.hw-tx {
  overflow: hidden;
  padding-right: 18px;
  font: inherit;
  text-overflow: ellipsis;
  white-space: pre;
}

.hw-tx.hw-i1 { padding-left: 2ch; }
.hw-tx.hw-i2 { padding-left: 4ch; }

.hw-k { color: var(--ps-peach); }
.hw-s { color: #a7e3c4; }
.hw-p { color: #8f7568; }

/* Une partie du manifeste s'allume quand on survole ou cible sa légende, et inversement. */
.hw-bp:has(.hw-lg[data-g="1"]:is(:hover, :focus-visible)) .hw-cl[data-g="1"],
.hw-bp:has(.hw-lg[data-g="2"]:is(:hover, :focus-visible)) .hw-cl[data-g="2"],
.hw-bp:has(.hw-lg[data-g="3"]:is(:hover, :focus-visible)) .hw-cl[data-g="3"],
.hw-bp:has(.hw-lg[data-g="4"]:is(:hover, :focus-visible)) .hw-cl[data-g="4"],
.hw-bp:has(.hw-lg[data-g="5"]:is(:hover, :focus-visible)) .hw-cl[data-g="5"],
.hw-bp:has(.hw-cl[data-g="1"]:hover) .hw-cl[data-g="1"],
.hw-bp:has(.hw-cl[data-g="2"]:hover) .hw-cl[data-g="2"],
.hw-bp:has(.hw-cl[data-g="3"]:hover) .hw-cl[data-g="3"],
.hw-bp:has(.hw-cl[data-g="4"]:hover) .hw-cl[data-g="4"],
.hw-bp:has(.hw-cl[data-g="5"]:hover) .hw-cl[data-g="5"] {
  background: rgba(255, 138, 76, 0.12);
  box-shadow: inset 3px 0 0 var(--ps-orange-light);
}

.hw-bp:has(.hw-cl[data-g="1"]:hover) .hw-lg[data-g="1"],
.hw-bp:has(.hw-cl[data-g="2"]:hover) .hw-lg[data-g="2"],
.hw-bp:has(.hw-cl[data-g="3"]:hover) .hw-lg[data-g="3"],
.hw-bp:has(.hw-cl[data-g="4"]:hover) .hw-lg[data-g="4"],
.hw-bp:has(.hw-cl[data-g="5"]:hover) .hw-lg[data-g="5"],
.hw-lg:hover,
.hw-lg:focus-visible {
  background: rgba(244, 81, 30, 0.06);
}

.hw-lg:focus-visible {
  outline: var(--ps-focus);
  outline-offset: 2px;
}

.hw-b {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ps-orange);
  color: #fff;
  font-family: var(--ps-font-mono);
  font-size: 11px;
  line-height: 1;
}

.hw-legend {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hw-lg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 12px;
  border-radius: 10px;
  cursor: default;
  transition: background-color 0.2s;
  border-top: 1px solid #e3cfc4;
}

.hw-lg:last-child {
  border-bottom: 1px solid #e3cfc4;
}

.hw-lg .hw-b {
  margin-top: 6px;
}

.hw-lg-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hw-lgt {
  color: var(--ps-ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hw-lgd {
  color: var(--ps-muted-light);
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

/* ---------- Vérification : les quatre verdicts défilent ---------- */

.hw-verify {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 140px;
  padding-bottom: 140px;
}

.hw-verdict {
  color: #fff;
  font-size: var(--ps-h2-size);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.hw-verdict-text {
  max-width: 34em;
  color: #d7c3b8;
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

.hw-word {
  display: block;
}

/* Mêmes couleurs de statut que partout sur le site (jetons --ps-status-*). */
.hw-word--trusted { color: var(--ps-status-trusted); }
.hw-word--untrusted { color: var(--ps-status-untrusted); }
.hw-word--invalid { color: var(--ps-status-invalid); }
.hw-word--none { color: var(--ps-status-none); }

.hw-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 138, 76, 0.18);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

/* Légende : les badges de l'extension (C2PA_Ext, thème actuel), capsule blanche,
   pastille de couleur du statut, libellé encre. */
.hw-key {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 12px;
  border: 1px solid #ecdcd3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
  color: #1c110b;
  font-size: 15px;
  font-weight: 800;
}

.hw-disk {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #94a3b8;
}

.hw-disk--verified { background: var(--ps-status-trusted); }
.hw-disk--signed { background: var(--ps-status-untrusted); }
.hw-disk--invalid { background: var(--ps-status-invalid); }
.hw-disk--none { background: var(--ps-status-none); }

/* Titre puis sous-titre empilés, comme sur toutes les sections. */
.hw-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.hw-head .f-lead {
  margin: 0;
  line-height: 1.55;
}

.ps-page main .f-q p {
  margin-left: 0;
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

@keyframes hw-cyc {
  0%, 23% { opacity: 1; transform: none; }
  25%, 98% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: none; }
}

.hw-cyc {
  animation: hw-cyc 12s linear infinite;
}

.hw-c0 { animation-delay: 0s; }
.hw-c1 { animation-delay: -9s; }
.hw-c2 { animation-delay: -6s; }
.hw-c3 { animation-delay: -3s; }

/* ---------- Mobile et mouvement réduit ---------- */

@media (max-width: 900px), (hover: none) {
  .hw-cyc {
    animation: none;
    opacity: 0;
  }

  .hw-c0 {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .hw-bp {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hw-codebox {
    border-radius: 12px;
    font-size: 11.5px;
    line-height: 1.7;
  }

  .hw-cl {
    grid-template-columns: 30px 24px minmax(0, 1fr);
  }

  .hw-ln::before {
    padding-right: 8px;
  }

  .hw-b {
    width: 17px;
    height: 17px;
    font-size: 10px;
  }

  .hw-lg {
    gap: 12px;
    padding: 12px 0;
  }

  .hw-lgt {
    font-size: 22px;
  }

  .hw-lgd {
    font-size: 17px;
  }

  .hw-verify {
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

@media (max-width: 380px) {
  .hw-codebox {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-cyc {
    animation: none;
    opacity: 0;
  }

  .hw-c0 {
    opacity: 1;
  }

  .ps-page .hw-board * {
    animation-timeline: auto;
  }
}


/* Tailles alignées sur le reste du site : titre du haut comme les autres pages produit,
   titres des étapes plus petits que les titres de section, verdict au gabarit d'un titre de section. */
.ps-page main .f-h1 {
  font-size: clamp(46px, 6.4vw, 104px);
  line-height: 0.9;
}

.ps-page main .f-step h2 {
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1;
}
