/* Mijoh Studio — v6 · Index des travaux */

/* ---------- Héros ---------- */
.tr-hero { padding-top: calc(var(--header-h) + clamp(44px, 6vw, 96px)); padding-bottom: clamp(40px, 4.6vw, 72px); }
.tr-hero__eyebrow { display: flex; justify-content: space-between; gap: 16px; margin-bottom: clamp(14px, 1.6vw, 24px); }
.tr-hero__main { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.tr-hero__title { grid-column: 1 / span 7; display: flex; align-items: flex-start; margin-left: -.035em; }
.tr-hero__word { display: block; }
.tr-hero__count {
  font-size: .2em; line-height: 1; letter-spacing: 0; vertical-align: baseline; font-variant-numeric: tabular-nums;
  margin: .2em 0 0 .18em; overflow: hidden; display: inline-block; padding: .06em .02em; position: relative;
}
.tr-hero__count span { display: inline-block; }
.tr-hero__lead { grid-column: 8 / -1; justify-self: end; max-width: 30ch; padding-bottom: .4em; }

.tr-tools { margin-top: clamp(30px, 3.6vw, 56px); }
.tr-tools__rule { height: 3px; background: var(--ink); transform-origin: left center; }
.tr-tools__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 24px; padding-top: 16px; }
.tr-filters { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tr-filters sup { font-size: 10px; font-weight: 700; margin-left: 2px; vertical-align: super; line-height: 0; font-variant-numeric: tabular-nums; opacity: .6; }
.tr-filters .chip input:checked + span sup { opacity: 1; }

/* Bascule Liste / Grille : pastille qui glisse */
.tr-view { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink); isolation: isolate; }
.tr-view__b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 620; font-size: 15px; transition: color .45s var(--ease); }
.tr-view__b svg { width: 14px; height: 14px; }
.tr-view__b[aria-pressed="true"] { color: var(--paper); }
.tr-view__pill { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--ink); transition: transform .6s var(--ease); }
.tr-view[data-view="grid"] .tr-view__pill { transform: translateX(100%); }

/* ---------- Index sombre ---------- */
.tr-index { padding: clamp(36px, 4vw, 64px) 0 clamp(80px, 9vw, 150px); position: relative; }
.tr-index__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; }
.tr-index__hint { display: none; }
.tr-list { position: relative; }
.tr-item[hidden] { display: none !important; }
.tr-link { position: relative; display: grid; color: inherit; }
.tr-item__idx { color: var(--mute-d); }
.tr-item__media { position: relative; display: block; overflow: hidden; background: var(--ink-3); border-radius: var(--r); }
.tr-item__media img, .tr-item__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tr-item__media video { opacity: 0; transition: opacity .6s var(--ease); }
.tr-item__media video.is-playing { opacity: 1; }
.tr-item__name { position: relative; display: block; justify-self: start; }
.tr-item__n { display: block; padding: .07em 0 .04em; white-space: nowrap; }
h3.tr-item__n { font: inherit; letter-spacing: inherit; } /* le titre garde la typo du bloc (pas celle d'un h3 par défaut) */
.tr-item__n--g {
  position: absolute; inset: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  clip-path: inset(-10% 100% -10% 0); transition: clip-path .85s var(--ease);
}
.tr-item__meta { display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.35; }
.tr-item__kind { font-weight: 650; }
.tr-item__place { color: var(--mute-d); }
.tr-item__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tr-item__tags span { font-size: 12px; font-weight: 620; padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-d); }
.tr-item__tags .is-live { display: inline-flex; align-items: center; gap: 6px; }
.tr-item__tags .is-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.tr-item__pitch { display: none; color: var(--mute-d); font-size: 15px; line-height: 1.45; max-width: 44ch; }
.tr-item__go {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; justify-self: end;
  box-shadow: inset 0 0 0 1.5px var(--line-d); transition: background-color .4s, box-shadow .4s, transform .6s var(--ease);
}
.tr-item__go svg { width: 16px; height: 16px; }

/* — Vue Liste — */
.tr-list.is-list { border-bottom: 1px solid var(--line-d); }
.tr-list.is-list .tr-link {
  grid-template-columns: 64px minmax(0, 1fr) minmax(220px, 23%) 48px;
  grid-template-areas: "idx name meta go";
  align-items: center; column-gap: var(--gap);
  padding-block: clamp(16px, 1.8vw, 28px); border-top: 1px solid var(--line-d);
  transition: opacity .5s var(--ease);
}
.tr-list.is-list .tr-item__idx { grid-area: idx; align-self: start; padding-top: .6em; }
.tr-list.is-list .tr-item__media { display: none; }
.tr-list.is-list .tr-item__name { grid-area: name; font-size: clamp(44px, 10.2vw, 184px); line-height: .84; transition: transform .9s var(--ease); }
.tr-list.is-list .tr-item__meta { grid-area: meta; }
.tr-list.is-list .tr-item__go { grid-area: go; }

/* Survol (pointeur fin) : la ligne passe en dégradé, les autres s'effacent */
html.fine .tr-list.is-list:hover .tr-link { opacity: .3; }
html.fine .tr-list.is-list .tr-link:hover { opacity: 1; }
html.fine .tr-list.is-list .tr-link:hover .tr-item__n--g, .tr-list.is-list .tr-link:focus-visible .tr-item__n--g { clip-path: inset(-10% 0 -10% 0); }
html.fine .tr-list.is-list .tr-link:hover .tr-item__name { transform: translateX(clamp(10px, 1.6vw, 28px)); }
html.fine .tr-link:hover .tr-item__go, .tr-link:focus-visible .tr-item__go { background: var(--paper); color: var(--ink); box-shadow: none; transform: rotate(45deg); }
.tr-link:focus-visible { outline-offset: -2px; }

/* Desktop sans carte flottante (tactile, mouvement réduit) : vignette dans la ligne */
@media (min-width: 900px) {
  html:not(.fine) .tr-list.is-list .tr-link, html.reduce .tr-list.is-list .tr-link {
    grid-template-columns: 64px clamp(150px, 15vw, 230px) minmax(0, 1fr) minmax(220px, 23%) 48px;
    grid-template-areas: "idx media name meta go";
  }
  html:not(.fine) .tr-list.is-list .tr-item__media, html.reduce .tr-list.is-list .tr-item__media { display: block; grid-area: media; aspect-ratio: 16 / 10; }
  html:not(.fine) .tr-list.is-list .tr-item__name, html.reduce .tr-list.is-list .tr-item__name { font-size: clamp(44px, 7.6vw, 140px); }
  html.fine.motion .tr-index__hint { display: block; }
}

/* — Vue Grille — */
.tr-list.is-grid {
  --stag: clamp(60px, 9vw, 160px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 48px); row-gap: clamp(48px, 5vw, 88px);
  align-items: start; padding-top: 10px;
}
.tr-list.is-grid.is-even-last { padding-bottom: var(--stag); }
.tr-list.is-grid .tr-item.is-even { translate: 0 var(--stag); }
.tr-list.is-grid .tr-link {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "idx idx" "media media" "name go" "meta meta" "pitch pitch";
  column-gap: 16px; align-items: center;
}
.tr-list.is-grid .tr-item__idx { grid-area: idx; margin-bottom: 12px; }
.tr-list.is-grid .tr-item__media {
  grid-area: media; aspect-ratio: 16 / 10; border-radius: var(--r-lg);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .6), 0 0 0 1px var(--line-d);
}
.tr-list.is-grid .tr-item__media img { transition: transform 1.2s var(--ease); }
html.fine .tr-list.is-grid .tr-link:hover .tr-item__media img { transform: scale(1.04); }
.tr-list.is-grid .tr-item__name { grid-area: name; font-size: clamp(34px, 4.4vw, 76px); line-height: .86; margin-top: 22px; }
html.fine .tr-list.is-grid .tr-link:hover .tr-item__n--g, .tr-list.is-grid .tr-link:focus-visible .tr-item__n--g { clip-path: inset(-10% 0 -10% 0); }
.tr-list.is-grid .tr-item__go { grid-area: go; margin-top: 22px; }
.tr-list.is-grid .tr-item__meta { grid-area: meta; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 12px; }
.tr-list.is-grid .tr-item__tags { margin-top: 0; }
.tr-list.is-grid .tr-item__pitch { grid-area: pitch; display: block; margin-top: 12px; }

/* ---------- Carte flottante ---------- */
.tr-float { display: none; position: fixed; left: 0; top: 0; z-index: 40; width: clamp(300px, 26vw, 440px); aspect-ratio: 16 / 10; pointer-events: none; }
@media (min-width: 900px) { html.fine.motion .tr-float { display: block; } }
.tr-float__in {
  position: absolute; inset: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-3);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(241, 239, 234, .1);
  opacity: 0; transform: scale(.4);
}
.tr-float__slide { position: absolute; inset: 0; overflow: hidden; clip-path: inset(100% 0 0 0); }
.tr-float__slide img, .tr-float__slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tr-float__slide video { opacity: 0; transition: opacity .5s var(--ease); }
.tr-float__slide video.is-playing { opacity: 1; }
.tr-float__tag {
  position: absolute; z-index: 50; left: 14px; bottom: 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 650;
}

/* ---------- Bande CTA ---------- */
.tr-cta { padding-block: clamp(90px, 11vw, 180px); overflow: clip; }
.tr-cta__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.tr-cta__text { grid-column: 1 / span 6; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.tr-cta__meta { display: flex; gap: 18px; align-items: baseline; }
.tr-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
/* Liens vers les services dans l'accroche : soulignés en permanence (pas seulement au survol) */
.tr-cta__link { background-size: 100% 1px; }
@media (hover: hover) { .tr-cta__link:hover { background-size: 100% 2px; } }
.tr-pile { grid-column: 7 / -1; position: relative; aspect-ratio: 5 / 4; }
.tr-pile__card {
  position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 16 / 10; margin: calc(62% * -.3125) 0 0 -31%;
  border-radius: var(--r-lg); overflow: hidden; background: var(--ink-3);
  box-shadow: 0 30px 60px -25px rgba(13, 13, 14, .45), 0 0 0 1px rgba(13, 13, 14, .06);
}
.tr-pile__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tr-pile__card--you {
  background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(14px, 1.6vw, 24px);
}
.tr-pile__card--you .display { font-size: clamp(30px, 3.6vw, 64px); line-height: .88; }
/* État éventaillé par défaut (sans JS ou mouvement réduit) ; le JS l'anime au défilement sinon */
html:not(.motion) .tr-pile__card:nth-child(1), html.reduce .tr-pile__card:nth-child(1) { transform: translate(-30%, 8%) rotate(-10deg); }
html:not(.motion) .tr-pile__card:nth-child(2), html.reduce .tr-pile__card:nth-child(2) { transform: translate(-10%, -6%) rotate(-4deg); }
html:not(.motion) .tr-pile__card:nth-child(3), html.reduce .tr-pile__card:nth-child(3) { transform: translate(10%, -2%) rotate(4deg); }
html:not(.motion) .tr-pile__card:nth-child(4), html.reduce .tr-pile__card:nth-child(4) { transform: translate(28%, 12%) rotate(9deg); }

/* ---------- Tablette / mobile ---------- */
@media (max-width: 1100px) {
  .tr-hero__title { grid-column: 1 / -1; }
  .tr-hero__lead { grid-column: 1 / span 8; justify-self: start; margin-top: 22px; padding-bottom: 0; }
}
@media (max-width: 899px) {
  .tr-hero__eyebrow .muted { display: none; }
  .tr-hero__lead { grid-column: 1 / -1; }
  .tr-tools__row { align-items: flex-start; }
  .tr-view__b { padding: 0 14px; }

  .tr-list.is-list .tr-link {
    grid-template-columns: minmax(0, 1fr) clamp(104px, 30vw, 200px);
    grid-template-areas: "idx idx" "name media" "meta meta";
    row-gap: 10px; align-items: center;
  }
  .tr-list.is-list .tr-item__idx { padding-top: 0; }
  .tr-list.is-list .tr-item__media { display: block; grid-area: media; aspect-ratio: 16 / 10; border-radius: 10px; }
  .tr-list.is-list .tr-item__name { font-size: clamp(38px, 11vw, 90px); }
  .tr-list.is-list .tr-item__meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .tr-list.is-list .tr-item__tags { margin-top: 4px; width: 100%; }
  .tr-list.is-list .tr-item__go { display: none; }

  .tr-list.is-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .tr-list.is-grid .tr-item.is-even { translate: none; }
  .tr-list.is-grid .tr-item__name { font-size: clamp(38px, 11vw, 72px); }

  .tr-cta__text { grid-column: 1 / -1; }
  .tr-pile { grid-column: 1 / -1; margin-top: 48px; width: 100%; max-width: 560px; justify-self: center; }
  .tr-pile__card { width: 60%; margin: calc(60% * -.3125) 0 0 -30%; }
}
@media (max-width: 520px) {
  .tr-hero__title { font-size: clamp(60px, 21vw, 110px); }
  .tr-tools__row { flex-direction: column; }
  .tr-filters .chip span { min-height: 42px; padding: 8px 15px; font-size: 14px; }
}


