/* ==============================================================
   Accueil — à propos et contact (noir et blanc uniquement)
   1. À propos (juste après la vitrine, sur le bloc blanc) :
      « Nathan Colin, » avec la fin de la phrase qui change au scroll
   2. Contact (après « Selected work », sur fond noir) : une carte
      blanche part du coin bas-droit et grandit jusqu'à remplir l'écran
   ============================================================== */

/* ---------- 1. À propos ---------- */

/* Sur le bloc blanc qui recouvre la vitrine : noir sur blanc */
.ab-wrap,
.ab-wrap.is-clair {
  position: relative;
  z-index: 1;
  --ab-fg: var(--noir);
  background: var(--blanc);
  color: var(--noir)
}

.ab-respiration {
  display: none
}

/* Section de la hauteur de l'écran, qui défile normalement */
.ab-roue-zone {
  position: relative
}

.ab-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(6rem, 13vh, 8rem) var(--marge) clamp(3rem, 8vh, 5rem);
  overflow: hidden
}

.ab-bloc {
  --ab-ligne: 1.05em;
  font-family: var(--font-titre);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3.5rem, 9.5vw, 14rem);
  font-size: var(--ab-taille, clamp(3.5rem, 9.5vw, 14rem));
  line-height: 1;
  letter-spacing: .005em;
  margin: 0
}

.ab-fixe {
  display: block
}

.ab-fente {
  display: block;
  position: relative;
  height: var(--ab-ligne);
  overflow: hidden
}

.ab-roue {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  will-change: transform
}

/* Chaque mot est plus haut que la fente : l'espace vide sous le mot
   évite qu'un bout du mot précédent dépasse au-dessus du suivant */
.ab-mot {
  display: flex;
  align-items: flex-start;
  height: calc(var(--ab-ligne) + .4em);
  padding-top: .025em;
  white-space: nowrap
}

.ab-mot--ital {
  font-style: italic
}

.ab-mot--contour {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ab-fg)
}

/* ---------- 2. Contact : la carte blanche qui grandit sur le noir ---------- */

.ct-wrap {
  position: relative;
  height: 180vh;
  background: var(--noir);
  z-index: 2
}

.ct-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden
}

.ct-card {
  position: absolute;
  overflow: hidden;
  background: var(--blanc);
  color: var(--noir);
  border-radius: var(--ct-r, 1.25rem);
  will-change: left, top, width, height
}

/* Le contenu fait toujours la taille de l'écran et reste fixe :
   la carte agit comme une fenêtre qui s'agrandit dessus */
.ct-inner {
  position: absolute;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 6rem);
  padding: clamp(6rem, 13vh, 8rem) var(--marge-nav) var(--marge-nav)
}

.ct-gauche {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0
}

.ct-titre {
  font-family: var(--font-titre);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3.2rem, min(8vw, 15vh), 10rem);
  line-height: .9;
  margin-top: 1rem
}

.ct-bas {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vh, 2rem)
}

.ct-email {
  display: inline-flex;
  align-items: baseline;
  gap: .6rem;
  color: var(--noir);
  text-decoration: none;
  font-family: var(--font-titre);
  text-transform: uppercase;
  font-size: clamp(1.8rem, min(3.6vw, 6.5vh), 4.2rem);
  line-height: 1
}

/* E-mail : au survol, chaque lettre monte et sa copie arrive par le bas
   (en cascade) */
.ct-email {
  position: relative;
  align-self: flex-start
}

.ct-email-txt {
  display: inline-flex;
  overflow: hidden;
  line-height: 1.1;
  padding-top: .04em
}

.ct-l {
  display: inline-block;
  text-shadow: 0 1.1em currentColor;
  transition: transform .6s cubic-bezier(.76, 0, .24, 1);
  transition-delay: calc(var(--i, 0) * 14ms)
}

.ct-email:hover .ct-l,
.ct-email:focus-visible .ct-l {
  transform: translateY(-1.1em)
}

@media (prefers-reduced-motion: reduce) {
  .ct-l {
    transition: none
  }
}

.ct-socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(10, 10, 10, .2)
}

.ct-socials a {
  color: var(--noir);
  text-decoration: none;
  font-size: 1rem;
  opacity: .8;
  transition: opacity .3s ease
}

.ct-socials a:hover {
  opacity: 1
}

.ct-droite {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.4rem, 2.4vw, 2.5rem);
  border: 1px solid rgba(10, 10, 10, .22);
  border-radius: clamp(1rem, 1.6vw, 1.75rem)
}

.ct-form-titre {
  font-family: var(--font-titre);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.2rem, min(4vw, 7vh), 4.5rem);
  line-height: .92
}

.bento-formulaire {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(.9rem, 2.2vh, 1.5rem);
  margin-top: clamp(1.2rem, 3.5vh, 2.5rem)
}

.bf-field {
  display: flex;
  flex-direction: column;
  gap: .4rem
}

.bf-field--message {
  flex: 1;
  min-height: 0
}

.bf-label {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(10, 10, 10, .5)
}

.bf-input {
  width: 100%;
  padding: .5rem 0;
  border: 0;
  border-bottom: 1px solid rgba(10, 10, 10, .22);
  border-radius: 0;
  background: transparent;
  color: var(--noir);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color .3s ease
}

.bf-input:focus {
  border-bottom-color: var(--noir)
}

.bf-textarea {
  flex: 1;
  min-height: 4.5rem;
  resize: none;
  line-height: 1.5
}

.bf-feedback {
  min-height: 1.2em;
  font-size: .82rem;
  color: rgba(10, 10, 10, .75)
}

.bf-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--noir);
  color: var(--blanc);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .4s var(--ease-out)
}

.bf-submit:hover {
  transform: translateY(-2px)
}

.bf-submit[disabled] {
  opacity: .6;
  cursor: default;
  transform: none
}

/* Quand la carte est petite : seule la flèche, le titre
   « Let's work together. » voyage jusqu'à sa place finale */
.ct-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--noir);
  cursor: pointer
}

.ct-wrap.is-open .ct-preview {
  pointer-events: none;
  visibility: hidden
}

/* Le titre bouge par transform (calculé en JS) */
.ct-titre {
  align-self: flex-start;
  position: relative;
  z-index: 3;
  transform-origin: 0 0;
  will-change: transform
}

/* Le reste du contenu arrive à la fin de l'agrandissement */
.ct-fade {
  opacity: var(--ct-fade, 1);
  transform: translateY(calc((1 - var(--ct-fade, 1)) * 1.5rem))
}

.ab-wrap a:focus-visible,
.ct-wrap a:focus-visible,
.ct-wrap button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px
}

/* ---------- Mobile / tablette : pas d'effets épinglés ---------- */

@media (max-width: 900px) {
  .ab-stage {
    padding-left: var(--marge-nav);
    padding-right: var(--marge-nav)
  }

  /* Sur téléphone, chaque mot peut tenir sur deux lignes */
  .ab-bloc {
    --ab-ligne: 2.1em;
    font-size: var(--ab-taille, clamp(3rem, 15vw, 6rem))
  }

  .ab-mot {
    white-space: normal;
    align-items: flex-start
  }

  .ct-wrap {
    height: auto;
    padding: 0 var(--marge-nav) var(--marge-nav)
  }

  .ct-stage {
    position: relative;
    height: auto;
    overflow: visible
  }

  .ct-card {
    position: relative;
    border-radius: clamp(1rem, 4vw, 1.5rem)
  }

  .ct-inner {
    position: relative;
    width: auto;
    height: auto;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: clamp(1.5rem, 6vw, 2.5rem)
  }

  .ct-titre {
    font-size: clamp(2.8rem, 14vw, 5rem)
  }

  .ct-email {
    font-size: clamp(1.4rem, 7vw, 2.4rem)
  }

  .ct-bas {
    margin-top: 2rem
  }

  .ct-preview {
    display: none
  }

  .bf-field--message {
    flex: none
  }
}

/* ---------- Showreel ---------- */

/* Plus près du titre « Nathan Colin, … » : remonte sur le blanc vide
   du bas de la section à propos */
.section-featured {
  position: relative;
  z-index: 1;
  margin-top: -22vh
}

/* « Showreel » + petit chiffre à côté, comme dans Selected work */
.featured-titre-ligne {
  display: flex;
  align-items: baseline;
  gap: .6rem
}

.featured-num {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-xs);
  letter-spacing: .05em;
  line-height: 1;
  color: rgba(10, 10, 10, .45)
}

@media (max-width: 900px) {
  .section-featured {
    margin-top: -12vh
  }
}
