/* Certificats C2PA : hero braise avec l'anatomie interactive d'un certificat X.509,
   puis les contenus de la page actuelle sur la trame des maquettes Ressources. */

/* ---------- Hero (fond braise, halo orange à droite) ---------- */

.ce-hero {
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 55% 65% at 75% 45%, rgba(244, 81, 30, 0.28), transparent 66%),
    var(--ps-ember);
}

.ce-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 96px;
}

.ce-hero-copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.ps-page .ce-h1 {
  max-width: 11em;
  color: #fff;
  font-size: clamp(46px, 5.8vw, 96px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.06em;
}

.ps-page .ce-lead {
  max-width: 34em;
  color: var(--ps-muted-dark);
  font-size: 20px;
  line-height: 1.5;
}

.ce-scene-col {
  flex: 1 1 540px;
  min-width: 0;
}

.ce-scene {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Titres de section ---------- */

.ce-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ps-page .ce-h2 {
  max-width: 14em;
  color: var(--ps-ink);
  font-size: clamp(40px, 5vw, 80px);
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.ps-page .f-dark .ce-h2 {
  color: #fff;
}

.ps-page .ce-h2--sm {
  font-size: clamp(32px, 3.6vw, 52px);
}

/* ---------- Étapes numérotées ---------- */

.ce-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-flow li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1.5px solid var(--ps-ink);
}

.ce-flow-num {
  color: var(--ps-orange-dark);
  font-family: var(--ps-font-mono);
  font-size: 13px;
}

.ce-flow strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ps-page .ce-flow p {
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.f-dark .ce-flow li {
  border-top-color: rgba(255, 138, 76, 0.3);
}

.f-dark .ce-flow-num {
  color: var(--ps-orange-light);
}

.f-dark .ce-flow strong {
  color: #fff;
}

.ps-page .f-dark .ce-flow p {
  color: #d7c3b8;
}

/* ---------- Fiches (bord encre, sans barre de couleur) ---------- */

.ce-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ce-cards--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ce-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1.5px solid var(--ps-ink);
  border-radius: 6px;
  background: #fffdf8;
}

.ce-tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--ps-radius-pill);
  background: rgba(244, 81, 30, 0.1);
  color: #9a3412;
  font-family: var(--ps-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ce-tag--ink {
  background: var(--ps-ink);
  color: var(--ps-peach);
}

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

.ps-page .ce-card p {
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.ce-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed #e3cfc4;
  list-style: none;
}

.ce-checks li {
  position: relative;
  padding-left: 22px;
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.ce-checks li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ps-orange);
}

.f-dark .ce-card {
  border: 1px solid rgba(255, 138, 76, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.ps-page .f-dark .ce-card h3 {
  color: #fff;
}

.ps-page .f-dark .ce-card p {
  color: #d7c3b8;
}

.f-dark .ce-tag {
  background: rgba(255, 138, 76, 0.14);
  color: var(--ps-peach);
}

.f-dark .ce-checks {
  border-top-color: rgba(255, 138, 76, 0.25);
}

.f-dark .ce-checks li {
  color: #d7c3b8;
}

/* ---------- Quatre statuts (le statut se lit dans sa pastille) ---------- */

.ce-statuses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ce-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 138, 76, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #d7c3b8;
  font-size: 19px;
  line-height: 1.55;
}

.ce-status-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: var(--ps-radius-pill);
  font-size: 15px;
  font-weight: 800;
}

.ce-status-name .ps-status-dot {
  width: 8px;
  height: 8px;
  box-shadow: none;
}

.ce-status--trusted .ce-status-name { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.ce-status--untrusted .ce-status-name { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
.ce-status--invalid .ce-status-name { background: rgba(214, 38, 74, 0.16); color: #f6a3b3; }
.ce-status--none .ce-status-name { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }

/* ---------- Encadré (titre, puis texte juste en dessous) ---------- */

.ce-callout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 40px;
  border-top: 1.5px solid var(--ps-ink);
}

.ce-callout > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-page .ce-callout > p {
  max-width: 34em;
  color: var(--ps-muted-light);
  font-size: 19px;
  line-height: 1.55;
}

.f-dark .ce-callout {
  border-top-color: rgba(255, 138, 76, 0.3);
}

.ps-page .f-dark .ce-callout > p {
  color: #d7c3b8;
}

/* ---------- Sources externes ---------- */

.ce-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ce-sources-label {
  margin-right: 6px;
  color: var(--ps-muted-light);
  font-size: 15px;
  font-weight: 600;
}

.ps-page main .ce-sources a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ps-line-light);
  border-radius: var(--ps-radius-pill);
  background: #fff;
  color: var(--ps-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.ps-page main .ce-sources a:hover {
  border-color: var(--ps-orange);
  color: var(--ps-orange-dark);
}

/* ---------- FAQ (fond papier, questions sans numéro) ---------- */

.ce-faq-head {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 18px;
}

.ps-page .ce-faq-head .f-lead {
  max-width: 22em;
}

.ps-page main .f-faqg .f-q p {
  margin-left: 0;
  font-size: 19px;
  line-height: 1.55;
}

.ce-head--gap {
  margin-top: 48px;
}

/* ---------- Scène : le certificat ---------- */

.ce-cert {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 2px solid var(--ps-ink);
  border-radius: 6px;
  background: #fffdf8;
  box-shadow: 12px 12px 0 var(--ps-orange);
  color: var(--ps-ink);
}

.ce-cert-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ps-ink);
}

.ce-cert-head b {
  font-size: 20px;
}

.ce-cert-head .ps-mono {
  font-size: 11px;
}

.ce-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ce-f {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ce-f[aria-pressed="true"],
.ce-f:hover {
  background: rgba(244, 81, 30, 0.12);
}

.ce-f-name {
  color: #9a3412;
  font-family: var(--ps-font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.ce-f-bar {
  height: 7px;
  border-radius: 3px;
  background: #d9c6bb;
}

.ce-w45 { width: 45%; }
.ce-w55 { width: 55%; }
.ce-w60 { width: 60%; }
.ce-w70 { width: 70%; }
.ce-w75 { width: 75%; }
.ce-w85 { width: 85%; }

.ce-panel {
  min-height: 90px;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--ps-ink);
  color: #fff;
}

.ce-panel-item[hidden] {
  display: none;
}

.ce-panel-key {
  color: var(--ps-orange-light);
  font-family: var(--ps-font-mono);
  font-size: 12px;
}

.ce-panel strong {
  display: block;
  margin: 2px 0 4px;
  font-size: 22px;
  font-weight: 900;
}

.ps-page .ce-panel p {
  color: var(--ps-muted-dark);
  font-size: 15px;
}

/* ---------- Encadré sous les statuts et sources ---------- */

.ce-callout {
  margin-top: 24px;
}

.ce-sources {
  margin-top: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .ce-f {
    transition: none;
  }
}

/* ---------- Écrans moyens et mobile ---------- */

@media (max-width: 1100px) {
  .ce-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 28px;
  }
}

@media (max-width: 900px) {
  .ce-hero-inner {
    padding-top: 32px;
    padding-bottom: 72px;
  }

  .ps-page .ce-h1 {
    font-size: clamp(42px, 12.5vw, 64px);
  }

  /* La scène garde ses proportions et rétrécit, comme dans la maquette. */
  .ce-scene {
    zoom: 0.62;
  }

  .ce-flow,
  .ce-cards,
  .ce-cards--2,
  .ce-statuses {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .ce-scene {
    zoom: 0.54;
  }
}
