/* =========================================================
   TATEA — S07 « Témoignages » : 4 mises en page dans la grille commune (pilotées par le défilement)
   A le projecteur · B la phrase en grand · C le mur de citations · D le fil
   Même départ sous le titre, même colonne de texte (--col), même bouton jaune en bas à gauche, même arrondi (--r).
   ========================================================= */
[data-tm] .tm__list { display: none; }
.tmx img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
:where(.tmx) button { font: inherit; color: inherit; text-align: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tmx blockquote, .tmx figure { margin: 0; }

/* la grille commune */
.tmx { position: absolute; left: var(--edge); right: var(--edge); top: calc(var(--top) + var(--tth, 110px) + var(--tg)); bottom: calc(var(--bh8, 0px) + var(--bot));
  display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "intro vis" "side vis" "foot vis"; gap: 16px var(--gap); }
.tmx .tm__intro { grid-area: intro; margin: 0; font-size: var(--intro); line-height: 1.45; color: var(--text); max-width: 38ch; }
.tmx__vis { grid-area: vis; position: relative; min-height: 0; }
.tmx .tm__foot { grid-area: foot; display: grid; justify-items: start; }

/* textes communs */
.tmx__mk { display: block; height: .42em; margin-bottom: .1em; overflow: visible; font-size: clamp(64px, 6vw, 104px); font-weight: 500; line-height: .75; color: var(--gold); }
.tmx__q { font-size: clamp(24px, 2.2vw, 38px); font-weight: 400; line-height: 1.15; letter-spacing: -.015em; }
.tmx__q b { font-weight: inherit; color: var(--gold); }
.tmx__x { margin: 14px 0 0; max-width: 52ch; font-size: clamp(14px, 1.02vw, 16px); line-height: 1.5; color: var(--text); }
.tmx__who { display: grid; gap: 3px; }
.tmx__who > b { font-size: clamp(15px, 1.1vw, 17px); font-weight: 600; }
.tmx__who > span { font-size: 13px; line-height: 1.35; color: var(--text); }
.tmx__who em { font-style: normal; font-weight: 600; color: var(--ink); }

/* les témoins dans la colonne de texte (A, B, D) */
.tmx__side { grid-area: side; align-self: center; margin: 0; padding: 0; list-style: none; }
.tmx__side li { border-top: 1px solid rgb(22 33 61 / .12); }
.tmx__side button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 0; color: rgb(22 33 61 / .38); transition: color .35s; }
.tmx__sn { display: grid; }
.tmx__sn b { font-size: clamp(14px, 1.05vw, 16.5px); font-weight: 500; line-height: 1.2; }
.tmx__sn small { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.tmx__side li.on button { color: var(--ink); }
.tmx__side li.on small { color: var(--gold); }
.tmx__side--r li { border: 0; }
.tmx__side--r button { padding: 4px 0; }
.tmx__av { flex: none; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; opacity: .45; filter: grayscale(1); transition: opacity .35s, filter .35s; }
.tmx__side li.on .tmx__av { opacity: 1; filter: none; }

/* ---------- A : le projecteur ---------- */
.tmx__stage { position: absolute; inset: 0; overflow: hidden; border-radius: var(--r); background: var(--night); color: #fff; }
.tmx__cone { position: absolute; z-index: 1; left: 0; top: -10%; width: 46%; height: 120%; pointer-events: none;
  background: radial-gradient(ellipse 50% 20% at 50% 100%, rgb(255 236 170 / .22), transparent 70%), linear-gradient(180deg, rgb(255 230 150 / .3), rgb(255 230 150 / .04));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); mix-blend-mode: screen; }
.tmx__shot { position: absolute; left: 6%; bottom: 0; width: 34%; height: 84%; overflow: hidden; border-radius: var(--r) var(--r) 0 0; will-change: transform, opacity; }
.tmx__tx { position: absolute; z-index: 2; left: 46%; right: 6%; top: 0; bottom: 0; }
.tmx--a .tmx__c { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; will-change: transform, opacity; }
.tmx--a .tmx__x { color: rgb(255 255 255 / .72); }
.tmx--a figcaption { margin-top: 22px; }
.tmx--a .tmx__who > span { color: rgb(255 255 255 / .6); }
.tmx--a .tmx__who em { color: #fff; }

/* ---------- B : la phrase en grand ---------- */
.tmx__big { position: absolute; inset: 0; }
.tmx--b .tmx__c { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; will-change: transform, opacity; }
.tmx--b .tmx__q { max-width: 22ch; font-size: clamp(34px, 3.6vw, 64px); line-height: 1.06; letter-spacing: -.025em; color: var(--ink); }
.tmx--b figcaption { display: flex; align-items: flex-start; gap: 18px; margin-top: clamp(22px, 4vh, 40px); }
.tmx__pt { flex: none; width: 72px; height: 72px; overflow: hidden; border-radius: 50%; }
.tmx--b .tmx__x { display: block; margin-top: 10px; max-width: 60ch; }

/* ---------- C : le mur de citations ---------- */
.tmx__wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tmx__tile { --on: 0; position: relative; overflow: hidden; display: block; border-radius: var(--r); background: #fff; color: var(--ink); }
.tmx__tim { position: absolute; inset: 0; opacity: var(--on); will-change: opacity; }
.tmx__tim::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(11 22 38 / .97) 45%, rgb(11 22 38 / .78)); }
.tmx__tim img { transform: scale(calc(1.1 - .1 * var(--on))); }
.tmx__tin { position: relative; height: 100%; display: flex; flex-direction: column; padding: clamp(14px, 1.6vw, 24px); }
.tmx--c .tmx__q { font-size: clamp(17px, 1.4vw, 23px); }
.tmx--c .tmx__x { display: none; margin-top: 10px; font-size: 13.5px; color: rgb(255 255 255 / .74); }
.tmx__id { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; }
.tmx__id .tmx__pt { width: 40px; height: 40px; }
.tmx--c .tmx__who > b { font-size: 14px; }
.tmx--c .tmx__who > span { font-size: 12px; }
.tmx__tile .tmx__who > span, .tmx__tile .tmx__who em { transition: color .3s; }
.tmx__tile.is-on { color: #fff; }
.tmx__tile.is-on .tmx__x { display: block; }
.tmx__tile.is-on .tmx__q b { color: var(--gold-strong); }
.tmx__tile.is-on .tmx__who > span { color: rgb(255 255 255 / .62); }
.tmx__tile.is-on .tmx__who em { color: #fff; }
.tmx__tile.is-on .tmx__id .tmx__pt { visibility: hidden; }

/* ---------- D : le fil ---------- */
.tmx--d .tmx__vis { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.tmx__ph { position: relative; overflow: hidden; border-radius: var(--r); background: var(--night); }
.tmx__im { position: absolute; inset: 0; will-change: opacity; }
.tmx__fil { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent); }
.tmx__trk { display: grid; gap: 14px; will-change: transform; }
.tmx__card { padding: clamp(18px, 2vw, 30px); border-radius: var(--r); background: #fff; will-change: opacity; }
.tmx--d .tmx__mk { font-size: 64px; }
.tmx--d .tmx__card .tmx__mk { margin-bottom: 14px; }
.tmx--d .tmx__q { font-size: clamp(20px, 1.7vw, 28px); }
.tmx--d figcaption { margin-top: 14px; }

/* ---------- tablette en paysage ---------- */
@media (min-width: 900px) and (max-width: 1180px) {
  .tmx__shot { left: 4%; width: 38%; }
  .tmx__tx { left: 46%; right: 5%; }
  .tmx--a .tmx__x { display: none; }
  .tmx--c .tmx__wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .tmx--c .tmx__q { font-size: 16px; }
  .tmx--c .tmx__tile.is-on .tmx__x { display: none; }
  .tmx--d .tmx__vis { grid-template-columns: minmax(0, 34%) minmax(0, 1fr); }
}

/* ---------- téléphone et tablette en portrait : intro, visuel, bouton l'un sous l'autre ---------- */
@media (max-width: 899px) {
  .tmx { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "intro" "vis" "foot"; gap: 12px; }
  .tmx__side { display: none; }
  .tmx__mk { font-size: 56px; }
  .tmx__q { font-size: 22px; }
  .tmx__x { font-size: 13.5px; margin-top: 10px; }
  .tmx__cone { left: -10%; width: 80%; height: 64%; }
  .tmx__shot { left: 18px; width: 38%; height: 38%; top: 18px; bottom: auto; border-radius: var(--r); }
  .tmx__tx { left: 18px; right: 18px; top: calc(38% + 34px); bottom: 18px; }
  .tmx--a .tmx__c { top: 0; translate: none; }
  .tmx--a figcaption { margin-top: 14px; }
  .tmx--a .tmx__x { display: none; }
  .tmx--b .tmx__q { font-size: 30px; }
  .tmx__pt { width: 56px; height: 56px; }
  .tmx--b figcaption { gap: 12px; }
  .tmx__wall { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; align-content: stretch; gap: 6px; }
  .tmx__tin { padding: 10px 14px; }
  .tmx--c .tmx__q { font-size: 15px; }
  .tmx--c .tmx__x, .tmx__tile.is-on .tmx__x { display: none; }
  .tmx__id { padding-top: 6px; }
  .tmx__id .tmx__pt { width: 28px; height: 28px; }
  .tmx--c .tmx__who > span { display: none; }
  .tmx__tile:not(.is-on) .tmx__q { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .tmx--d .tmx__vis { grid-template-columns: minmax(0, 1fr); grid-template-rows: 30% minmax(0, 1fr); gap: 10px; }
  .tmx--d .tmx__q { font-size: 19px; }
  .tmx--d .tmx__mk { font-size: 48px; }
  .tmx__card { padding: 16px; }
}
