/* Liste de confiance C2PA : hero braise où l'on choisit un cas et où la chaîne se résout,
   puis les contenus de la page actuelle sur la trame des maquettes Ressources. */

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

.tl-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);
}

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

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

.ps-page .tl-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 .tl-lead {
  max-width: 34em;
  color: var(--ps-muted-dark);
  font-size: 20px;
  line-height: 1.5;
}

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

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

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

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

.ps-page .tl-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 .tl-h2 {
  color: #fff;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tl-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tl-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;
}

.tl-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;
}

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

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

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

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

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

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

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

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

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

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

.tl-sources-label {
  margin-right: 6px;
  color: var(--ps-faint-dark);
  font-family: var(--ps-font-mono);
  font-size: 13px;
}

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

.ps-page main .tl-sources a:hover {
  border-color: var(--ps-orange-light);
  background: var(--ps-hover);
}

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

/* ---------- Scène : choix du cas ---------- */

.tl-cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tl-case {
  min-height: 44px;
  padding: 10px 16px;
  border: 1.5px solid rgba(255, 211, 189, 0.3);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ps-ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}

.tl-case[aria-pressed="true"] {
  border-color: #fff;
  background: #fff;
  color: var(--ps-ember);
}

@media (hover: hover) {
  .tl-case:hover {
    transform: translateY(-2px);
  }
}

/* ---------- Scène : la chaîne ---------- */

.tl-chain {
  margin-top: 18px;
}

.tl-result {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-result[hidden] {
  display: none;
}

.tl-n {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  padding: 14px;
  border: 2px solid rgba(255, 138, 76, 0.3);
  border-radius: 14px;
  background: var(--ps-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.tl-n span {
  color: var(--ps-peach);
  font-family: var(--ps-font-mono);
  font-size: 12px;
  font-weight: 400;
}

.tl-n b {
  font-size: 26px;
}

.tl-l {
  width: 3px;
  height: 26px;
  background: rgba(255, 211, 189, 0.3);
}

.tl-result--trusted .tl-l { background: var(--ps-status-trusted); }
.tl-result--invalid .tl-l { background: var(--ps-status-invalid); }

.tl-result--trusted .tl-n--verdict {
  border-color: var(--ps-status-trusted);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.33);
}

.tl-result--trusted .tl-n--verdict b { color: var(--ps-status-trusted); }

.tl-result--untrusted .tl-n--verdict {
  border-color: var(--ps-status-untrusted);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.33);
}

.tl-result--untrusted .tl-n--verdict b { color: var(--ps-status-untrusted); }

.tl-result--invalid .tl-n--verdict {
  border-color: var(--ps-status-invalid);
  box-shadow: 0 0 30px rgba(214, 38, 74, 0.33);
}

.tl-result--invalid .tl-n--verdict b { color: var(--ps-status-invalid); }

/* ---------- Deux contextes de confiance ---------- */

.tl-decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.tl-decision .tl-tag {
  margin-top: auto;
}

.tl-or {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ps-ink);
  color: var(--ps-peach);
  font-family: var(--ps-font-mono);
  font-size: 13px;
  align-self: center;
}

.tl-tag--trusted {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

/* ---------- Encadré et sources ---------- */

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

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

.f-paper .tl-sources-label {
  color: var(--ps-muted-light);
}

.ps-page main .f-paper .tl-sources a:not(.ps-btn):not(.ps-row):not(.ps-card) {
  border-color: #d9c6bb;
  color: var(--ps-ink);
}

.ps-page main .f-paper .tl-sources a:not(.ps-btn):not(.ps-row):not(.ps-card):hover {
  border-color: var(--ps-orange);
  background: rgba(244, 81, 30, 0.06);
}

/* ---------- FAQ (questions sans numéro) ---------- */

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

.ps-page .tl-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;
}

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

  .tl-case:hover {
    transform: none;
  }
}

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

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

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

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

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

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

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

@media (max-width: 900px) {
  .tl-decision {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .tl-decision .tl-card {
    width: 100%;
  }
}
