/* ─── Fonts ───────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "NM Serif";
  src: url("../fonts/NM_Serif_ik.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura Std";
  src: url("../fonts/FuturaStd-Book.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ─── Font classes ────────────────────────────────────────────────────────── */
.f-serif {
  font-family: "NM Serif", serif;
}

.f-sans {
  font-family: "Futura Std", sans-serif;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* html = fond sombre fixe ; body transparent pour ne pas le couvrir */
html {
  height: 100%;
  background-color: #06081c;
  color: #fff;
  scrollbar-gutter: stable;
}

body {
  height: 100%;
  /* overflow: hidden; */
}

.s-three,
.s-six {
  background-color: #06081c;
}

#smooth-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#smooth-content {
  overflow: visible;
  width: 100%;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #06081c;
  pointer-events: none;
}

#bg-image {
  position: fixed;
  inset: 0;
  z-index: -1;
}

#intro-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 600px;
  width: 75%;
  pointer-events: none;
}


#scroll-arrow {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  width: 65px;
  opacity: 0;
}

/* ─── Typography ──────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "NM Serif", serif;
  font-weight: normal;
}

h1 {
  font-size: 4.4rem;
}

h3 {
  font-size: 2.3rem;
}

.appear {
  color: rgba(155, 155, 155, 1);
}


.f-serif.gris {
  color: rgba(255, 255, 255, 1);
  font-family: "Futura Std", sans-serif;
  font-size: 1rem !important;

}

/* textes par-dessus images ou vidéos → blanc */
.s-six-bis p,
.s-four p {
  color: #fff;
}


h1.solo,
h3.suite {
  margin-bottom: 2.4rem;
}

p {
  color: rgba(155, 155, 155, 1);
  line-height: 1.5;
  margin-bottom: 20px;
  text-wrap: balance;
}

.modal p {
  margin-bottom: 40px;
}

p.f-serif,
span.f-serif {
  font-size: 1.2rem;
}

p:last-child {
  margin-bottom: 0;
}

polyline {
  stroke: #fff
}

/* ─── Layout & Utilities ──────────────────────────────────────────────────── */
.center {
  text-align: center;
}

/* <picture> transparent à la mise en page : l'<img> reste enfant direct du
   parent (sinon height:100%/object-fit cassent car le picture inline n'a pas
   de hauteur définie). N'affecte pas la bascule responsive des <source>. */
picture {
  display: contents;
}

section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-full {
  width: 100%;
  height: 100vh;
}

.text-content {
  max-width: 780px;
  padding: 0 1.5rem;
}

.text-content h1,
.text-content h3 {
  text-align: center;
}

/* ─── Shared section patterns ─────────────────────────────────────────────── */

/* section-content dans les sections à médias masqués */
.s-four_four .section-content,
.s-five .section-content,
.s-eight .section-content {
  position: relative;
  z-index: 0;
}

/* s-five : texte scindé en 2 parties.
   Desktop → display:contents = wrappers transparents, le texte flue normalement.
   Mobile (voir @media) → les 2 parties s'empilent (grid) pour un cross-fade. */
.s-five-part {
  display: contents;
}

.vid-wrapper,
.s-eight .img-wrapper {
  pointer-events: none;
}

/* wrapper média plein viewport centré */
.s-four_four .vid-wrapper,
.s-five .vid-wrapper,
.s-eight .img-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  z-index: 10;
}

/* ─── Masque sprite : système commun aux 4 (s-four_four, s-five, s-eight, menu) ──
   Bande PNG horizontale de N frames (mask-size: N×100% 100%). On avance frame par
   frame en déplaçant --mask-x de 0% (frame 0) à 100% (dernière), avec steps(N-1).
   --mask-x est enregistré (@property) pour être animable aussi bien par GSAP
   (scrub scroll, s-four_four/s-five/s-eight) que par CSS @keyframes (clic, menu). */
@property --mask-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.s-four_four video,
.s-five video,
.s-eight img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  --mask-x: 0%;
  -webkit-mask-position: var(--mask-x) 50%;
  mask-position: var(--mask-x) 50%;
}

.s-four_four video {
  -webkit-mask-image: url(../medias/TR-01_edit_raw_strip.png);
  mask-image: url(../medias/TR-01_edit_raw_strip.png);
  -webkit-mask-size: 3600% 100%;
  mask-size: 3600% 100%;
}

.s-five video {
  -webkit-mask-image: url(../medias/TR-02_edit_raw_strip.png);
  mask-image: url(../medias/TR-02_edit_raw_strip.png);
  -webkit-mask-size: 4100% 100%;
  mask-size: 4100% 100%;
}

.s-eight img {
  -webkit-mask-image: url(../medias/TR-03_edit_raw_strip.png);
  mask-image: url(../medias/TR-03_edit_raw_strip.png);
  -webkit-mask-size: 3600% 100%;
  mask-size: 3600% 100%;
}



.img-9_9 {
  height: 100%;
  object-fit: cover;
  width: auto;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
}

/* gradient bas commun */
.s-four_four .vid-gradient,
.s-five .vid-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20%;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(to top,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

/* révélé par GSAP dans s-four_four, toujours visible dans s-five */
.s-four_four .vid-gradient {
  opacity: 0;
}

/* ─── s-one ───────────────────────────────────────────────────────────────── */
.s-one {
  position: relative;
}

.s-one .content_0 {
  text-transform: uppercase;
  font-size: 1.9rem;
}

#s-one-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-one .text-content {
  max-width: 720px;
  max-inline-size: 50ch;
}

.s-one .content_1 {
  max-width: 550px;
}

.s-one .appear {
  color: rgba(155, 155, 155, 0.25);
}

.s-one .content_0 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
}

/* ─── s-two ───────────────────────────────────────────────────────────────── */
.s-two {
  position: relative;
  height: 120vh;
  margin-top: -20vh;
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 80%,
      rgba(0, 0, 0, .65) 85%,
      rgba(0, 0, 0, .3) 90%,
      rgba(0, 0, 0, .08) 95%,
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      transparent 0%,
      rgba(0, 0, 0, .08) 5%,
      rgba(0, 0, 0, .3) 10%,
      rgba(0, 0, 0, .65) 15%,
      black 20%,
      black 80%,
      rgba(0, 0, 0, .65) 85%,
      rgba(0, 0, 0, .3) 90%,
      rgba(0, 0, 0, .08) 95%,
      transparent 100%);
}

.s-two img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-two .img-jpg {
  position: absolute;
  opacity: 0;
  z-index: 0;
  will-change: opacity;
  transform: translateZ(0);
}

.s-two .img-png {
  z-index: 1;
}

/* ─── s-three ─────────────────────────────────────────────────────────────── */
.s-three {
  padding-block: 10rem;
}

.s-three .appear {
  color: rgba(155, 155, 155, 0.25);
}

/* ─── s-four ──────────────────────────────────────────────────────────────── */
.s-four {
  position: relative;
  height: 100vh;
}

.s-four video,
.s-four img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-four img {
  object-position: top center;
}

.s-four-quote {
  position: absolute;
  top: 50%;
  left: 25%;
  transform: translate(-50%, -50%);
  width: 40%;
  max-width: 480px;
  color: #fff;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  font-family: "NM Serif", serif;
}

.s-four-quote p {
  font-size: 1.1rem;
  line-height: 1.7;
}

.s-six-quote {
  position: relative;
  z-index: 3;
  text-align: center;
  font-family: "NM Serif", serif;
  color: #fff;
}

.s-six-quote p {
  font-size: 1.1rem;
  line-height: 1.7;
}


.s-four-author {
  margin-top: 3rem;
  font-family: "Futura Std";
}

.s-four::before,
.s-four::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 1;
  pointer-events: none;
}

.s-four::before {
  top: -1px;
  background: linear-gradient(to bottom,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

.s-four::after {
  bottom: -1px;
  background: linear-gradient(to top,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

/* ── s-four_bis (en attente — séquence canvas) ──────────────────────────────
.s-four_bis { position: relative; padding-block: 10rem; background-color: #06081c; }
.s-four_bis .section-content { position: relative; z-index: 0; }
.s-four_bis .seq-wrapper { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100vw; height: 100vh; }
.s-four_bis canvas { position: absolute; inset: 0; width: 100%; height: 100%; --mask-x: 0%; -webkit-mask: url(../medias/TR_04_strip.png); mask: url(../medias/TR_04_strip.png); -webkit-mask-size: 7500% 100%; mask-size: 7500% 100%; -webkit-mask-position: var(--mask-x) 0; mask-position: var(--mask-x) 0; }
.s-four_bis .seq-gradient { position: absolute; bottom: 0; left: 0; width: 100%; height: 20%; z-index: 10; pointer-events: none; opacity: 0; background: linear-gradient(to top, #06081c 0%, rgba(6,8,28,.75) 25%, rgba(6,8,28,.45) 45%, rgba(6,8,28,.15) 65%, transparent 100%); }
── */

/* ─── s-four_four ─────────────────────────────────────────────────────────── */
.s-four_four {
  position: relative;
  padding-block: 10rem;
  background-color: #06081c;
}

/* ─── s-five ──────────────────────────────────────────────────────────────── */
.s-five {
  position: relative;
  padding-block: 10rem;
  background-color: #06081c;
}

.s-five .appear {
  color: rgba(155, 155, 155, 0.25);
}

.s-six-bis::before,
.s-six-bis::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 1;
  pointer-events: none;
}

.s-six-bis::before {
  top: -1px;
  background: linear-gradient(to bottom,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

.s-six-bis::after {
  bottom: -1px;
  background: linear-gradient(to top,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

/* ─── s-six ───────────────────────────────────────────────────────────────── */
.s-six {
  padding-block: 10rem;
}


.s-six-ter {
  padding-top: 12%;
  padding-bottom: 12%;
  margin: auto;
  text-align: center;
}

.s-six-ter .appear {
  color: rgba(155, 155, 155, 0.25);
}

/* ─── s-six-bis ───────────────────────────────────────────────────────────── */
.s-six-bis {
  position: relative;
  height: 100vh;
}

.s-six-bis img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── s-seven ─────────────────────────────────────────────────────────────── */
.s-seven {
  position: relative;
  height: 100vh;
  padding-block: 10rem;
}

.s-seven video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-seven-gradient-top,
.s-seven-gradient-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 1;
  pointer-events: none;
}

.s-seven-gradient-top {
  top: -1px;
  background: linear-gradient(to bottom,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

.s-seven-gradient-bottom {
  bottom: -1px;
  opacity: 0;
  background: linear-gradient(to top,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

.s-seven-sound {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 2;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.s-seven-sound:hover {
  border-color: #fff;
}

.s-seven-sound .icon-on {
  display: block;
}

.s-seven-sound .icon-off {
  display: none;
}

.s-seven-sound.is-muted .icon-on {
  display: none;
}

.s-seven-sound.is-muted .icon-off {
  display: block;
}

.s-nine .jpg-jpg {
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
}

.s-okok .appear p {
  color: rgba(155, 155, 155, 0.25);
}

.s-okok,
.s-eight-text {
  padding-top: 12%;
  padding-bottom: 12%;
}

.s-ninenine {
  position: relative;
  overflow: hidden;
}

.s-ninenine .img-wrapper-9_9,
.s-ninenine .img-wrapper-9_10 {
  position: absolute;
  inset: 0;
}

.s-ninenine img {
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
  display: block;
}

.s-ninenine .text-9_10 {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 25%;
  transform: translate(-50%, -50%);
  width: 40%;
  max-width: 480px;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.jp .s-ninenine .text-9_10 {
  max-width: 510px;
}

.s-ninenine .gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to top,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

.logo-start {
  margin-bottom: 30px;
}

.logo-end {
  position: absolute;
  width: 45%;
  padding: 0 8%;
  left: 0;
  opacity: 0;
}

.footer {
  position: absolute;
  display: flex;
  width: 100%;
  bottom: 20px;
  left: 0;
  justify-content: space-between;
  padding: 0 50px;
  text-transform: uppercase;
  opacity: 0;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

#back-to-top {
  cursor: pointer;
}

/* ─── s-eight ─────────────────────────────────────────────────────────────── */
.s-eight {
  position: relative;
  padding-block: 10rem;
  background-color: #06081c;
}

.img-gradient-8 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to top,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

/* ─── s-nine ──────────────────────────────────────────────────────────────── */
.s-nine {
  position: relative;
}

.s-nine-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
      #06081c 0%,
      rgba(6, 8, 28, 0.75) 25%,
      rgba(6, 8, 28, 0.45) 45%,
      rgba(6, 8, 28, 0.15) 65%,
      transparent 100%);
}

/* ─── Open modal buttons ──────────────────────────────────────────────────── */
.open_modal {
  display: block;
  text-align: center;
  cursor: pointer;
  margin-top: 3rem;
  text-decoration: underline;
  letter-spacing: 0.05em;
}

/* ─── Modals ──────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: #06081c;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  padding: 0 1.5rem;
  text-align: center;
}

.modal-content p {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  margin-bottom: 5rem;
  max-width: 990px;
  gap: 1rem;
}

.grid-6 img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.modal-close {
  position: absolute;
  top: 4rem;
  right: 4rem;
  background: none;
  border: 1px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
}

.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 20%;
  width: 60%;
  height: 1px;
  background: #fff;
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

/* ─── Burger ──────────────────────────────────────────────────────────────── */
#burger {
  opacity: 0;
  position: fixed;
  top: 4rem;
  left: 4rem;
  z-index: 1000;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#burger span {
  display: block;
  width: 28px;
  height: 1px;
  background: #fff;
  transform-origin: center;
  transition: transform 0.4s ease, opacity 0.3s ease, background-color 0.3s ease 0s;
}

#burger.is-open span {
  background: #06081c;
  transition: transform 0.4s ease, opacity 0.3s ease, background-color 0.3s ease 1s;
}

#burger.is-open span:first-child {
  transform: translateY(4px) rotate(45deg);
}

#burger.is-open span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ─── Nav overlay (menu) ──────────────────────────────────────────────────────
   Même système sprite que s-four_four/s-five/s-eight : on anime --mask-x 0%→100%
   avec steps(35) (36 frames). Ici c'est le CSS (au clic) qui l'anime, pas GSAP.
   Comme on anime la variable (pas mask-position directement), plus besoin de
   dupliquer les préfixes -webkit dans les keyframes. */
@keyframes nav-reveal {
  from {
    --mask-x: 0%;
  }

  to {
    --mask-x: 100%;
  }
}

@keyframes nav-hide {
  from {
    --mask-x: 100%;
  }

  to {
    --mask-x: 0%;
  }
}

/* Mobile : pas de mask, simple fondu (voir media query plus bas). L'animationend
   du fondu reste nécessaire pour que closeNav() retire .is-closing (JS inchangé). */
@keyframes nav-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes nav-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

#nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: url(../medias/bck_menu.jpg) center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  --mask-x: 0%;
  -webkit-mask: url(../medias/TR-04_edit_raw_strip.png);
  mask: url(../medias/TR-04_edit_raw_strip.png);
  -webkit-mask-size: 3600% 100%;
  mask-size: 3600% 100%;
  -webkit-mask-position: var(--mask-x) 50%;
  mask-position: var(--mask-x) 50%;
}

#nav-overlay.is-open {
  pointer-events: all;
  -webkit-animation: nav-reveal 1.2s steps(35) forwards;
  animation: nav-reveal 1.2s steps(35) forwards;
}

#nav-overlay.is-closing {
  pointer-events: none;
  -webkit-animation: nav-hide 1.2s steps(35) forwards;
  animation: nav-hide 1.2s steps(35) forwards;
}

#nav-overlay ul {
  list-style: none;
  text-align: center;
}

#nav-overlay li {
  overflow: hidden;
  margin-bottom: 3rem;
}

#nav-overlay li:last-child {
  margin-bottom: 0;
}

#nav-overlay a {
  text-transform: uppercase;
  font-family: "NM Serif", serif;
  font-size: 2rem;
  color: #06081c;
  text-decoration: none;
  display: inline-block;
  /* opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease; */
}

/* ─── Tablet & Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 1023px) {

  html,
  body {
    height: auto;
    overflow: auto;
  }

  #smooth-wrapper {
    position: static;
    height: auto;
    overflow: visible;
  }

  /* Mobile : pas de mask sprite sur le menu. Le fond (bck_menu.jpg) apparaît
     simplement en fondu. display:none quand fermé → pas de calque fixed en
     permanence. On neutralise le mask hérité du desktop et on remplace les
     animations nav-reveal/nav-hide par un fondu opacité. */
  #nav-overlay {
    display: none;
    opacity: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  #nav-overlay.is-open,
  #nav-overlay.is-closing {
    display: flex;
  }

  #nav-overlay.is-open {
    -webkit-animation: nav-fade-in 0.45s ease forwards;
    animation: nav-fade-in 0.45s ease forwards;
  }

  #nav-overlay.is-closing {
    -webkit-animation: nav-fade-out 0.45s ease forwards;
    animation: nav-fade-out 0.45s ease forwards;
  }

  /* s-five : les 2 parties du texte s'empilent dans la même cellule grid
     (cross-fade géré par scroll-mobile.js). align-items:center → chaque partie
     garde sa vraie hauteur et se centre dans la cellule (sinon la plus courte,
     étirée/alignée en haut, apparaît décalée vers le haut). */
  .s-five .section-content {
    display: grid;
    align-items: center;
  }

  .s-five-part {
    display: block;
    grid-area: 1 / 1;
  }

  /* mobile : sprites pivotés 90° (bande verticale) → la même animation --mask-x
     pilote l'axe Y, la révélation se fait de bas en haut (vidéo/img restent
     droites), et le cadrage portrait déforme moins (frame 9:16 au lieu de 16:9). */
  .s-four_four video {
    -webkit-mask-image: url(../medias/TR-01_edit_raw_strip_vertical.png?v=2);
    mask-image: url(../medias/TR-01_edit_raw_strip_vertical.png?v=2);
    -webkit-mask-size: 100% 3600%;
    mask-size: 100% 3600%;
    -webkit-mask-position: 50% var(--mask-x);
    mask-position: 50% var(--mask-x);
  }

  .s-five video {
    -webkit-mask-image: url(../medias/TR-02_edit_raw_strip_vertical.png?v=2);
    mask-image: url(../medias/TR-02_edit_raw_strip_vertical.png?v=2);
    -webkit-mask-size: 100% 4100%;
    mask-size: 100% 4100%;
    -webkit-mask-position: 50% var(--mask-x);
    mask-position: 50% var(--mask-x);
  }

  .s-eight img {
    -webkit-mask-image: url(../medias/TR-03_edit_raw_strip_vertical.png?v=2);
    mask-image: url(../medias/TR-03_edit_raw_strip_vertical.png?v=2);
    -webkit-mask-size: 100% 3600%;
    mask-size: 100% 3600%;
    -webkit-mask-position: 50% var(--mask-x);
    mask-position: 50% var(--mask-x);
  }

}

@media (max-width: 991px) {

  #nav-overlay a {
    font-size: 1.5rem;
  }

  /* s-four-quote : réaffiché (masqué en tablette) et placé en bas, 80% de large */
  .s-four-quote {
    display: block;
    top: auto;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: none;
  }

  .modal p {
    margin-bottom: 25px;
  }

  /* avant-dernier paragraphe (le dernier avant la signature) */
  .modal p:nth-last-of-type(2) {
    margin-bottom: 0;
  }

  .modal p:last-of-type {
    margin-bottom: 0;
  }

  /* .text-9_10 déplacé (voir scroll-mobile.js) devant le p de .s-eight-text :
     gris comme les autres paragraphes (au lieu du blanc prévu pour l'overlay
     photo desktop), et espace restauré (perdu via p:last-child) */
  .text-9_10 p {
    color: rgba(155, 155, 155, 1) !important;
  }

  .text-9_10 p:last-child {
    margin-bottom: 20px;
  }

  h1 {
    font-size: 3.3rem;
  }

  h3 {
    font-size: 1.9rem;
  }

  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .text-content {
    width: 100%;
    max-width: 100%;
    padding: 0 1.5rem;
  }

  .s-four-quote,
  .col_3 {
    display: none;
  }

  .footer {
    padding: 0 1.5rem;
    font-size: 0.8rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  #burger {
    top: 2.5rem;
    left: 2rem;
  }

}