/* ph.css — Strike · « La méthode » : trois phases, de Strike aux commandes à vos équipes aux commandes.
   18/10 (Benjamin) : la partie « on travaille ensemble » passe en sombre, sobre, et chaque phase a sa photo d'atelier.
   Pour chaque phase : une phrase, une barre (la part du travail portée par Strike), une ligne, des pastilles, une photo.
   Sur ordinateur, la section se fige et les phases suivent le défilement (ph.js) ; on peut aussi cliquer. Sur téléphone : on clique.
   Sans JavaScript : les trois phases l'une sous l'autre, la première photo. */
.dep { --d0: #0A0F15; --tx: #F2EFE4; --tx2: rgba(242, 239, 228, .7); --tx3: rgba(242, 239, 228, .5); --ln2: rgba(242, 239, 228, .2);
  --dm: clamp(8px, 1.1vw, 16px);   /* the dark band sits just inside the page, its corners rounded */
  position: relative; margin-inline: var(--dm); border-radius: clamp(20px, 2.4vw, 34px); overflow: clip;
  background: var(--d0); color: var(--tx); }
/* the page's guides, carried on in light across the band (same columns as .aura__grid) */
.dep::before { content: ""; position: absolute; inset: 0; z-index: 0; margin-inline: auto; pointer-events: none;
  width: min(100% + 2 * var(--dm) - 2 * var(--gutter), var(--container)); border-right: 1px solid rgba(242, 239, 228, .045);
  background: linear-gradient(to right, rgba(242, 239, 228, .045) 1px, transparent 1px) 0 0 / calc(100% / 12) 100%; }
.dep__stick { position: relative; z-index: 1;
  background: radial-gradient(56% 62% at 80% 42%, rgba(50, 181, 236, .085), transparent 72%), radial-gradient(50% 46% at 6% 100%, rgba(180, 113, 239, .055), transparent 70%); }
.dep__in { padding-top: clamp(96px, 14vh, 160px); padding-bottom: clamp(56px, 9vh, 110px); }
.dep .dep__k { color: var(--tx); }
.dep .dep__k::before { box-shadow: inset 0 0 0 1px var(--tx); background: radial-gradient(circle, var(--tx) 0 1.4px, transparent 1.9px); }
.dep__t { margin: 16px 0 0; max-width: 15em; color: var(--tx); font: 400 clamp(40px, 4.3vw, 70px)/.98 var(--display); letter-spacing: -.015em; }
.dep .dep__t em { display: block; color: var(--tx3); }

/* the phase switch: a hairline track, a light pill slides under the phase on */
.ph__tabs { position: relative; display: inline-flex; margin-top: clamp(22px, 3.4vh, 34px); padding: 4px; border: 1px solid var(--ln2); border-radius: 99px; }
.ph__tab { position: relative; z-index: 1; padding: 11px 20px 10px; border: 0; border-radius: 99px; background: none; color: var(--tx2); font: 500 15px/1 var(--sans);
  cursor: pointer; transition: color .4s; }
.ph__tab:hover { color: var(--tx); }
.ph__tab.is-on { color: var(--d0); }
.ph__tab:focus-visible { outline: 1px solid rgba(242, 239, 228, .55); outline-offset: 3px; }   /* keyboard only, and quiet */
.ph__pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: var(--pw, 0px); border-radius: 99px; background: var(--tx);
  transform: translateX(var(--px, 0px)); transition: transform .55s cubic-bezier(.16, 1, .3, 1), width .55s cubic-bezier(.16, 1, .3, 1); }
html:not(.js) .ph__pill { display: none; }
html:not(.js) .ph__tab { color: var(--tx); cursor: default; }

/* a phase: the sentence, the bar and its figure, one line, the chips */
/* 18/10: the section title is gone; the title of the phase on is the title of the view.
   The kicker stands on its own line, the phase switch under it (side by side looked accidental). */
.dep .dep__k { display: flex; width: fit-content; }
.dep__panels { margin-top: clamp(30px, 5.5vh, 60px); }
.dep__h { max-width: 13em; margin: 0; color: var(--tx); font: 400 clamp(42px, 4.6vw, 74px)/.98 var(--display); letter-spacing: -.015em; word-spacing: .12em; text-wrap: balance; }
.dep__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(24px, 4vw, 64px); margin-top: clamp(24px, 4.5vh, 48px); }
.dep__track { position: relative; display: block; height: 8px; border-radius: 99px; background: rgba(242, 239, 228, .12); }
.dep__track i { position: absolute; inset: 0; border-radius: 99px; background: var(--spectrum);
  clip-path: inset(0 calc((1 - var(--v, 0)) * 100%) 0 0 round 99px); transition: clip-path 1.1s cubic-bezier(.65, 0, .35, 1) .15s; }
.dep__n { display: flex; flex-direction: column; align-items: flex-end; margin: 0; }
.dep__n b { font: 400 clamp(60px, 6.4vw, 104px)/.88 var(--display); letter-spacing: -.02em; white-space: nowrap;
  background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dep__n span { margin-top: 10px; color: var(--tx); font: 500 12.5px/1.2 var(--mono); white-space: nowrap; }
.dep__p { max-width: 40em; margin: clamp(20px, 3.5vh, 34px) 0 0; color: var(--tx2); font: 400 clamp(16px, 1.25vw, 20px)/1.5 var(--sans); }
.dep__chips { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(20px, 3.5vh, 32px) 0 0; padding: 0; list-style: none; }
.dep__chips li { padding: 10px 16px; border-radius: 10px; background: rgba(242, 239, 228, .14); color: var(--tx); font: 500 15px/1.2 var(--sans); }

/* the photo of the phase on: one frame, the three photos cross-fade (ph.js writes data-on on the section) */
.dep--media .dep__in { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); column-gap: clamp(40px, 6vw, 112px); align-items: center; }
.dep--media .dep__t { font-size: clamp(38px, 3.7vw, 60px); }
.dep--media .dep__h { font-size: clamp(40px, 4.2vw, 66px); }
.dep--media .dep__n b { font-size: clamp(52px, 5.2vw, 86px); }
.dep__media { position: relative; justify-self: end; width: min(100%, calc((100svh - var(--nav-h, 76px) - 16vh) / 1.08)); aspect-ratio: 1 / 1.08;
  margin: 0; border-radius: clamp(14px, 1.4vw, 22px); overflow: hidden; isolation: isolate; background: #121A24; }
.dep__media::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(242, 239, 228, .1); pointer-events: none; }
.dep__ph { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.06);
  transition: opacity .9s cubic-bezier(.65, 0, .35, 1), transform 1.8s cubic-bezier(.16, 1, .3, 1); }
.dep__ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(1.05) brightness(.9); }
.dep__ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 15, 21, .28), rgba(10, 15, 21, 0) 26%, rgba(10, 15, 21, 0) 58%, rgba(10, 15, 21, .5)), rgba(14, 30, 50, .14); }
.dep__no { position: absolute; z-index: 2; left: clamp(14px, 1.4vw, 20px); top: clamp(13px, 1.3vw, 18px); color: rgba(242, 239, 228, .88); font: 500 12px/1 var(--mono); letter-spacing: .04em; }
.dep:not(.is-js) .dep__ph:first-child, .dep[data-on="0"] .dep__ph:nth-child(1), .dep[data-on="1"] .dep__ph:nth-child(2), .dep[data-on="2"] .dep__ph:nth-child(3) { opacity: 1; transform: none; }

/* with the script: one phase at a time, cross-faded; the bar fills when its phase comes on */
.dep.is-js .dep__panels { display: grid; }
.dep.is-js .ph__pan { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translate3d(0, 18px, 0);
  transition: opacity .45s, transform .7s cubic-bezier(.16, 1, .3, 1), visibility 0s .45s; }
.dep.is-js .ph__pan.is-on { opacity: 1; visibility: visible; transform: none;
  transition: opacity .55s .12s, transform .8s .12s cubic-bezier(.16, 1, .3, 1), visibility 0s; }
/* 18/10: one bar for the three phases, under them: it slides 75 → 50 → 25 % and its figure counts (ph.js), it
   never starts again from zero. Each phase keeps its own bar in the page, for screen readers and for no JavaScript. */
.dep__bar--live { display: none; }
.dep.is-js .dep__bar--live { display: grid; }
.dep.is-js .ph__pan .dep__bar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dep__bar--live .dep__track i { transition: clip-path .9s cubic-bezier(.65, 0, .35, 1); }
@media (prefers-reduced-motion: reduce) { .dep__bar--live .dep__track i { transition: none; } }
html:not(.js) .ph__pan + .ph__pan { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--ln2); }
/* desktop, live: the section pins; one phase per half screen */
html.js .dep.is-live { height: calc(100svh + 3 * 55svh); }
html.js .dep.is-live .dep__stick { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; height: 100svh; }
html.js .dep.is-live .dep__in { width: min(100% - 2 * var(--gutter), var(--container)); padding-top: calc(var(--nav-h, 76px) + 2vh); padding-bottom: 3vh; }

@media (max-width: 900px) { .dep::before { background-size: calc(100% / 4) 100%; } }
@media (max-width: 860px) {
  .dep { --dm: 8px; border-radius: 20px; }
  .dep--media .dep__in { display: flex; flex-direction: column; }
  .dep--media .dep__copy { display: contents; }
  .dep__k { order: 1; align-self: flex-start; } .dep__t { order: 2; } .dep__media { order: 3; } .ph__tabs { order: 4; } .dep__panels { order: 5; } .dep__bar--live { order: 6; align-self: stretch; }   /* 18/10: after the panels (it came first on phones) */
  .dep__media { justify-self: auto; width: 100%; aspect-ratio: 4 / 3; margin-top: 26px; }
  .ph__tabs { display: flex; width: 100%; }
  .ph__tab { flex: 1; padding: 12px 6px 11px; font-size: 14px; white-space: nowrap; }
  .dep__panels { margin-top: 30px; }
  .dep__h, .dep--media .dep__h { font-size: clamp(34px, 9.4vw, 46px); }
  .dep__bar { column-gap: 20px; }
  .dep__n b, .dep--media .dep__n b { font-size: 50px; }
  .dep__n span { font-size: 11px; }
  .dep__chips { gap: 8px; }
  .dep__chips li { padding: 9px 13px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .dep__ph { transform: none; transition: opacity .2s; } }
@media print { .ph__tabs { display: none; } .dep { background: none; color: var(--ink); } }
