
.coach { position: relative; background: var(--paper); }
.coach__scene {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px;
  padding: var(--section) var(--gouttiere);
  max-width: var(--max); margin: 0 auto;
}

.coach__cadre {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: var(--r-carte);
  background: var(--fond-photo);
}
.coach__media {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1s var(--ease), transform 1.4s var(--ease), clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.coach__media:first-child { opacity: 1; transform: none; }
.coach__media img, .coach__media video {
  width: 100%; height: 100%; object-fit: cover; filter: var(--photo);
}
.coach__media:first-child img { object-position: 50% 10%; }

.coach__planche { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 6px; height: 100%; padding: 6px; background: var(--paper); }
.coach__planche img { min-height: 0; border-radius: 10px; }
.coach__planche--assiettes { grid-template-rows: repeat(4, 1fr); }
.coach__planche--assiettes img { border-radius: 8px; }

.coach__media--fondu img { position: absolute; inset: 0; object-position: 50% 22%; }
.coach__media--fondu .coach__second { opacity: 0; transition: opacity 1.1s var(--ease); }
.coach__media--fondu.est-second .coach__second { opacity: 1; }
.coach__legende {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(253, 252, 250, .92); color: var(--ink);
  font-size: .8125rem; line-height: 1.2; white-space: nowrap;
  transition: opacity 1.1s var(--ease);
}
.coach__legende sup { font-size: .72em; line-height: 0; vertical-align: .42em; }
.coach__legende--2 { opacity: 0; }
.coach__media--fondu.est-second .coach__legende--1 { opacity: 0; }
.coach__media--fondu.est-second .coach__legende--2 { opacity: 1; }

.coach__chapitres { display: grid; gap: 44px; align-content: center; }
.coach__chap { max-width: 34ch; }
.coach__n { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--encre-3); margin-bottom: 14px; }
.coach__titre {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.3rem, 4.8vw, 4.4rem); line-height: 1.02; letter-spacing: -.012em;
  text-wrap: balance;
}
.coach__titre em { font-style: italic; }
.coach__preuve {
  margin-top: 16px;
  font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap;
}
.coach__texte { margin-top: 16px; font-size: 1.0625rem; line-height: 1.55; color: var(--encre-2); max-width: 34ch; }
.coach__chap .lien { display: inline-block; margin-top: 18px; }
@media (max-width: 420px) { .coach__preuve { font-size: .75rem; letter-spacing: .08em; } }

@media (prefers-reduced-motion: no-preference) {
  .js .coach.est-anime { height: calc(100svh + var(--n, 5) * 55svh); }
  .js .coach.est-anime .coach__scene {
    position: sticky; top: 0; height: 100svh;
    padding-top: calc(var(--hdr) + 24px); padding-bottom: 88px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center; gap: clamp(32px, 6vw, 96px);
  }
  .js .coach.est-anime .coach__cadre { height: auto; aspect-ratio: 4 / 5; justify-self: end; width: min(100%, calc(min(76svh, 100svh - var(--hdr) - 112px, 760px) * .8)); }

  .js .coach.est-anime .coach__media { opacity: 0; transform: scale(1.06); clip-path: inset(8% 0 8% 0 round var(--r-carte)); }
  .js .coach.est-anime .coach__media.est-actif { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round var(--r-carte)); }

  .js .coach.est-anime .coach__chapitres { position: relative; display: block; height: 60svh; }
  .js .coach.est-anime .coach__chap {
    position: absolute; left: 0; right: 0; top: 50%;
    opacity: 0; transform: translateY(calc(-50% + 28px));
    transition: opacity .7s var(--ease), transform 1s var(--ease);
    pointer-events: none;
  }
  .js .coach.est-anime .coach__chap.est-actif { opacity: 1; transform: translateY(-50%); pointer-events: auto; transition-delay: .12s; }
  .js .coach.est-anime .coach__chap.est-passe { transform: translateY(calc(-50% - 28px)); }
}

@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js .coach.est-anime .coach__scene { display: block; padding: 0; max-width: none; }
  .js .coach.est-anime .coach__cadre {
    position: absolute; inset: 0; height: auto; width: auto; aspect-ratio: auto; border-radius: 0; clip-path: none;
    justify-self: stretch; align-self: stretch;
    background: var(--ink);
  }
  .js .coach.est-anime .coach__cadre::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(0deg, rgba(10, 9, 6, .84) 0, rgba(10, 9, 6, .4) 40%, rgba(10, 9, 6, 0) 60%);
  }
  .js .coach.est-anime .coach__media, .js .coach.est-anime .coach__media.est-actif { clip-path: none; }
  .js .coach.est-anime .coach__planche { padding: calc(var(--hdr) + 6px) 6px 6px; background: var(--ink); }
  .js .coach.est-anime .coach__legende { top: calc(var(--hdr) + 12px); bottom: auto; }
  .js .coach.est-anime .coach__media--fondu img { top: calc(var(--hdr) + 52px); height: calc(100% - var(--hdr) - 52px); }
  .js .coach.est-anime .coach__chapitres {
    position: absolute; left: var(--gouttiere); right: var(--gouttiere); bottom: 128px; top: auto; height: 46svh; z-index: 2; opacity: 1;
  }
  .js .coach.est-anime .coach__chap { top: auto; bottom: 0; transform: translateY(28px); color: #fdfcfa; }
  .js .coach.est-anime .coach__chap.est-actif { transform: none; }
  .js .coach.est-anime .coach__chap.est-passe { transform: translateY(-28px); }
  .js .coach.est-anime .coach__chap::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    left: calc(-1 * var(--gouttiere)); width: 100vw; top: -56px; bottom: -32px;
    background: linear-gradient(180deg, rgba(10, 9, 6, 0) 0, rgba(10, 9, 6, .5) 56px, rgba(10, 9, 6, .5) calc(100% - 32px), rgba(10, 9, 6, 0) 100%);
  }
  .js .coach.est-anime .coach__n { color: #fdfcfa; }
  .js .coach.est-anime .coach__texte { color: rgba(253, 252, 250, .92); }
  .js .coach.est-anime .coach__n, .js .coach.est-anime .coach__texte, .js .coach.est-anime .coach__preuve { text-shadow: 0 1px 12px rgba(10, 9, 6, .6); }
  .js .coach.est-anime .coach__preuve { color: #fdfcfa; }
  .js .coach.est-anime .coach__chap .lien { color: #fdfcfa; text-decoration-color: rgba(253, 252, 250, .6); }
  .js .coach.est-anime .coach__chap :focus-visible { outline-color: #fdfcfa; }
}

@media (min-width: 901px) {
  .coach:not(.est-anime) .coach__scene { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .coach:not(.est-anime) .coach__cadre { position: sticky; top: calc(var(--hdr) + 24px); }
}
.js .coach:not(.est-anime) .coach__media { opacity: 0; transform: none; }
.js .coach:not(.est-anime) .coach__media.est-actif { opacity: 1; }
@media (max-width: 900px) {
  .js .coach:not(.est-anime) .coach__scene { gap: 0; }
  .js .coach:not(.est-anime) .coach__cadre, .js .coach:not(.est-anime) .coach__chapitres { display: contents; }
  .js .coach:not(.est-anime) .coach__media {
    position: relative; inset: auto; opacity: 1;
    width: min(100%, 460px); aspect-ratio: 4 / 5; margin-bottom: 22px;
    overflow: hidden; border-radius: var(--r-carte); background: var(--fond-photo);
  }
  .js .coach:not(.est-anime) .coach__chap { margin-bottom: 56px; }
  .js .coach:not(.est-anime) .coach__chap:last-of-type { margin-bottom: 0; }
  .js .coach:not(.est-anime) .coach__media:nth-of-type(1) { order: 1; }
  .js .coach:not(.est-anime) .coach__chap:nth-of-type(1) { order: 2; }
  .js .coach:not(.est-anime) .coach__media:nth-of-type(2) { order: 3; }
  .js .coach:not(.est-anime) .coach__chap:nth-of-type(2) { order: 4; }
  .js .coach:not(.est-anime) .coach__media:nth-of-type(3) { order: 5; }
  .js .coach:not(.est-anime) .coach__chap:nth-of-type(3) { order: 6; }
  .js .coach:not(.est-anime) .coach__media:nth-of-type(4) { order: 7; }
  .js .coach:not(.est-anime) .coach__chap:nth-of-type(4) { order: 8; }
  .js .coach:not(.est-anime) .coach__media:nth-of-type(5) { order: 9; }
  .js .coach:not(.est-anime) .coach__chap:nth-of-type(5) { order: 10; }
}

@media (prefers-reduced-motion: reduce) {
  .coach__media, .coach__media--fondu .coach__second, .coach__legende { transition: none; }
}
