/* charles-v1. Marque personnelle, theme clair, trame work exoape. */

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
}

html[data-theme="clair"] {
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

em {
  font-style: italic;
  font-synthesis: style;
}

.t-display em {
  font-weight: var(--fw-regular);
  font-synthesis: style;
}

.saut {
  position: absolute;
  left: var(--gutter);
  top: 0.35rem;
  z-index: 60;
  transform: translateY(-120%);
}

.saut:focus {
  transform: none;
}

/* ------------------------------------------------------------------ */
/* Tete. Overlay. Nav Charles / Travail / Ecrire / Neoria.            */
/* ------------------------------------------------------------------ */

.tete {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  background: var(--veil);
}

.page-accueil main,
.page-travail main,
.page-404 main {
  padding: 0;
}

.tete__nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

@media (min-width: 601px) {
  .tete__cta {
    display: none;
  }
}

@media (max-width: 600px) {
  .tete__nav {
    display: flex;
    gap: 0;
    margin-inline-start: auto;
  }

  .tete__nav a[href="index.html"] {
    display: none;
  }

  .tete__nav a {
    padding-inline: 0.45rem;
  }

  .tete__cta {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Accueil. Pin + beats. Le fond-mot suit --p.                        */
/* ------------------------------------------------------------------ */

.chapitre-3d {
  position: relative;
  height: auto;
  background: var(--bg);
}

.chapitre-pin {
  position: relative;
  height: auto;
  min-height: 100svh;
  overflow: hidden;
}

.fond-mot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 18vw, 14rem);
  font-weight: var(--fw-regular);
  font-style: italic;
  font-synthesis: style;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--fg);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  transform: scale(calc(1 + (var(--p, 0) * 0.38))) rotate(calc(var(--p, 0) * -5deg));
  transform-origin: 50% 45%;
}

.pin-barre {
  position: absolute;
  top: var(--header-offset);
  left: 0;
  z-index: 3;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: var(--accent);
  pointer-events: none;
}

.beats {
  position: relative;
  z-index: 2;
  height: auto;
}

[data-beat] {
  display: flex;
  align-items: flex-end;
  min-height: 0;
  padding: 2.75rem var(--gutter);
  box-sizing: border-box;
}

[data-beat]:first-child {
  min-height: calc(100svh - var(--header-offset));
  padding-top: calc(var(--header-offset) + 1.5rem);
}

[data-beat] .sur-pin {
  max-width: min(46rem, 94vw);
}

[data-beat] .t-display {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-size: var(--fs-3xl);
  letter-spacing: -0.018em;
}

[data-beat] .t-body {
  margin: 0 0 1.25rem;
  color: var(--fg);
}

[data-beat] .t-caption {
  margin: 0 0 1.5rem;
  color: var(--fg-mute);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.note-neoria {
  margin: 0;
  color: var(--fg-mute);
}

html[data-defilement="desktop"] .chapitre-3d {
  height: 320vh;
}

html[data-defilement="desktop"] .chapitre-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  height: 100vh;
}

html[data-defilement="desktop"] .beats {
  height: 100%;
}

html[data-defilement="desktop"] [data-beat] {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: calc(var(--header-offset) + 1.5rem) var(--gutter) 2.75rem;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) rotate(-0.4deg);
  transition:
    opacity 700ms var(--ease-appear),
    transform 700ms var(--ease-appear);
}

html[data-defilement="desktop"] [data-beat].is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fond-mot,
  .pin-barre,
  html[data-defilement="desktop"] [data-beat] {
    transition: none;
    transform: none;
  }

  html[data-defilement="desktop"] [data-beat] {
    position: relative;
    inset: auto;
    opacity: 1;
    pointer-events: auto;
    min-height: 70svh;
  }

  html[data-defilement="desktop"] .chapitre-3d {
    height: auto;
  }

  html[data-defilement="desktop"] .chapitre-pin {
    position: relative;
    height: auto;
  }
}

/* ------------------------------------------------------------------ */
/* Suite accueil. Teasers, preuves, Neoria, ecrire.                   */
/* ------------------------------------------------------------------ */

.suite {
  padding: 4.5rem var(--gutter) 5.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.suite h2 {
  margin: 0 0 0.75rem;
}

.suite > .t-caption,
.suite > .t-body {
  margin: 0 0 1.75rem;
}

.teasers {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 4rem;
}

@media (min-width: 900px) {
  .teasers {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.teasers .cas {
  padding-bottom: 1rem;
}

.teasers .cas__media {
  margin: 0 0 0.85rem;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--bg-mute);
}

.teasers .cas__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
}

.preuves-ligne {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 4rem;
}

@media (min-width: 800px) {
  .preuves-ligne {
    grid-template-columns: 1fr 1fr;
  }
}

.preuve {
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--line);
  max-width: none;
}

.preuve__pastille {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  margin: 0 0 0.75rem;
  padding: 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: max(14px, var(--fs-xs));
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
}

.bloc-neoria,
.bloc-ecrire {
  padding-top: 2.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.bloc-neoria .actions,
.bloc-ecrire .actions {
  margin-top: 1.25rem;
}

.formulaire {
  margin-top: 1.25rem;
}

[data-form-ok] {
  margin: 0.75rem 0 0;
  color: var(--ok);
}

/* ------------------------------------------------------------------ */
/* Travail. Desktop = scene plein cadre. Mobile = liste.              */
/* ------------------------------------------------------------------ */

.travail-hero {
  padding: calc(var(--header-offset) + 1.75rem) var(--gutter) 1.75rem;
}

.travail-hero h1 {
  margin: 0 0 0.75rem;
}

.travail-hero .t-body {
  margin: 0 0 0.5rem;
}

.travail-hero .t-caption {
  margin: 0;
  color: var(--fg-mute);
}

.work {
  display: none;
}

.catalogue {
  display: grid;
  gap: 2.5rem;
  padding: 0.5rem var(--gutter) 4rem;
}

.catalogue .projet .carte__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
  background: var(--bg-mute);
}

.catalogue .carte__verbe {
  position: static;
  grid-row: auto;
  grid-column: auto;
  opacity: 1;
  pointer-events: auto;
  margin: 0.85rem 0 0;
  width: fit-content;
}

@media (min-width: 800px) {
  html.js-work .travail-hero {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  html.js-work .catalogue {
    display: none;
  }

  html.js-work .work {
    display: block;
    position: relative;
    height: 100svh;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
  }

  html.js-work.is-overview .work {
    visibility: hidden;
    pointer-events: none;
  }

  html.js-work.is-overview .catalogue {
    display: none;
  }
}

.work__scene {
  position: absolute;
  inset: 0;
}

.work__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  clip-path: inset(12% 8% 12% 8%);
  transform: scale(1.35) rotate(7deg);
}

.work__slide.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  clip-path: inset(0);
  transform: none;
  z-index: 1;
}

.work__slide.is-leave {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transform: scale(1.45) rotate(-7deg);
}

.work__slide.is-enter {
  opacity: 1;
  visibility: visible;
  z-index: 3;
  clip-path: inset(0);
  transform: none;
}

html:not(.reduit) .work__slide {
  transition:
    clip-path 900ms cubic-bezier(0.5, 0, 0, 1),
    transform 900ms cubic-bezier(0.5, 0, 0, 1),
    opacity 500ms var(--ease-ui);
}

.work__fond,
.work__inset {
  position: absolute;
  overflow: hidden;
}

.work__fond {
  inset: 0;
}

.work__fond img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0.28;
  transform: scale(1.08);
}

.work__inset {
  top: 18%;
  right: 8%;
  width: min(38vw, 28rem);
  height: min(46vh, 22rem);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: 0 18px 40px rgba(20, 22, 26, 0.08);
}

@media (max-width: 1100px) {
  .work__inset {
    top: 20%;
    width: min(32vw, 18rem);
    height: min(34vh, 16rem);
  }
}

.work__inset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 12% 18%;
  transform: scale(1.12);
}

.work__ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-offset) + 1.1rem) var(--gutter) 1.35rem;
  pointer-events: none;
}

.work__ui button,
.work__ui a {
  pointer-events: auto;
}

.work__intro .t-kicker {
  margin: 0 0 0.35rem;
  color: var(--fg-mute);
}

.work__intro .t-caption {
  margin: 0;
  max-width: 36ch;
  color: var(--fg-mute);
}

.work__copy {
  max-width: 22rem;
  pointer-events: auto;
}

.work__nom {
  margin: 0 0 0.35rem;
  overflow: hidden;
}

.work__nom-ligne {
  display: block;
  transform-origin: 0 100%;
}

html:not(.reduit) .work__nom-ligne {
  transition: transform 700ms cubic-bezier(0.5, 0, 0, 1);
}

.work.is-swap .work__nom-ligne {
  transform: translateY(110%) rotate(7deg);
}

.work__sous,
.work__phrase {
  margin: 0 0 0.55rem;
}

.work__phrase {
  color: var(--fg);
}

.work__verbe {
  pointer-events: auto;
}

.work__bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  pointer-events: auto;
}

.work__compte {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.work__nav {
  display: flex;
  gap: 0.4rem;
}

.work__nav button,
.work__tous {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
}

/* Case. Texte apres le waouh. */

.work__case {
  position: absolute;
  inset: auto var(--gutter) 5.5rem var(--gutter);
  z-index: 6;
  max-width: 36rem;
  padding: 1.25rem 1.35rem 1.15rem;
  background: var(--veil);
  border: 1px solid var(--line);
  pointer-events: auto;
}

.work__case[hidden] {
  display: none;
}

.work__case h2 {
  margin: 0 0 0.5rem;
}

.work__case p {
  margin: 0 0 0.7rem;
}

.work__case .actions {
  margin: 0.4rem 0 0;
}

/* Curseur Voir. Cercle, pas un blob. Desktop souris seulement. */

.work__curseur {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  margin: -2.75rem 0 0 -2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(244, 245, 247, 0.72);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0);
}

html.js-work.curseur-on .work__curseur {
  opacity: 1;
}

html.js-work.curseur-on .work {
  cursor: none;
}

/* ------------------------------------------------------------------ */
/* Overview. Frise horizontale, pas une grille de logos.              */
/* ------------------------------------------------------------------ */

.frise {
  display: none;
}

html.js-work.is-overview .frise {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  min-height: 100vh;
  padding: calc(var(--header-offset) + 1rem) 0 5rem;
  background: var(--bg);
}

.frise__piste {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.frise__carte {
  flex: 0 0 22vw;
  min-width: 11rem;
  max-width: 18rem;
  scroll-snap-align: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.frise__carte img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top left;
  background: var(--bg-mute);
  border: 1px solid var(--line);
}

.frise__carte span {
  display: block;
  margin-top: 0.55rem;
}

.frise__bas {
  position: fixed;
  right: var(--gutter);
  bottom: 1rem;
  left: var(--gutter);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.frise__bas .t-meta {
  margin: 0;
  color: var(--fg-mute);
}

/* ------------------------------------------------------------------ */
/* 404 + pied.                                                        */
/* ------------------------------------------------------------------ */

.page-404 main {
  padding: calc(var(--header-offset) + 3rem) var(--gutter) 4rem;
}

.page-404 h1 {
  margin: 0 0 0.75rem;
}

.pied {
  position: relative;
  z-index: 5;
  background: var(--bg);
}

html.js-work:not(.is-overview) .page-travail .pied {
  display: none;
}

@media (max-width: 799px) {
  html.js-work .page-travail .pied {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work__slide,
  .work__nom-ligne,
  .work__curseur,
  .fond-mot {
    transition: none;
  }

  html.js-work.curseur-on .work {
    cursor: auto;
  }

  html.js-work.curseur-on .work__curseur {
    display: none;
  }
}
