/* v22 — company-team : la finale de la page Company. Tout est scopé sous #team. */

/* ---------- Rythme vertical (grille de 8) ---------- */
.company-page #team { padding: 56px 0 52px; }

/* ---------- Titre et support ---------- */
#team .collaboration-copy { max-width: 900px; }
#team h2 {
  font-size: clamp(2.6rem, 4.35vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -.046em;
  text-wrap: balance;
  hanging-punctuation: first last;
}
#team .collaboration-subtitle {
  margin-top: 20px;
  max-width: 30em;
  margin-inline: auto;
  color: #687581;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -.008em;
  text-wrap: balance;
}

/* ---------- L'aquarelle : cadrage complet, fondu dans le blanc ---------- */
/* Boîte réellement peinte, mesurée sur le fichier 1672×934 : x 296→1424,
   y 239→925. Affichée à l'échelle 0,53 (886 px de large) : le tableau mural,
   les six personnes avec leurs têtes entières, la table complète et son ombre
   au sol tiennent dans le cadre, à ~20 px des zones de fondu.
   Le masque termine le fondu dans le blanc sur les quatre bords. */
#team .collaboration-art {
  position: relative;
  width: min(100%, 760px);
  height: 380px;
  margin: 24px auto 0;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-composite: intersect;
}
#team .collaboration-art img {
  display: block;
  position: absolute;
  width: 886px;
  max-width: none;
  height: auto;
  left: calc(50% - 456px);
  top: -115px;
  will-change: transform;
}

/* ---------- L'action finale ---------- */
#team .company-final-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 12px;
  padding: 0 24px;
}
/* Le bouton reste le bouton partagé : même bleu, même icône, même géométrie.
   Il gagne juste la présence d'une fin de page. */
#team .company-final-action .btn-primary {
  height: 56px;
  padding: 0 28px;
  border-radius: 15px;
  font-size: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 2px 6px rgba(0, 122, 255, .16),
    0 12px 30px rgba(0, 122, 255, .26);
  transition: background .2s cubic-bezier(.2,.7,.2,1), transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s cubic-bezier(.2,.7,.2,1);
}
#team .company-final-action .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 2px 8px rgba(0, 122, 255, .18),
    0 18px 38px rgba(0, 122, 255, .3);
}
#team .company-final-action .btn-primary:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 1px 4px rgba(0, 122, 255, .18),
    0 6px 16px rgba(0, 122, 255, .22);
}
#team .company-final-action .btn-primary .button-arrow { opacity: .8; transition: transform .2s cubic-bezier(.2,.7,.2,1); }
#team .company-final-action .btn-primary:hover .button-arrow { transform: translate(1px, -1px); }

/* Réassurance : même phrase, contraste conforme (5,1:1) et calage optique. */
#team .company-final-action .availability {
  margin: 16px 0 0;
  color: #61707e;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: -.004em;
  text-wrap: balance;
}

/* Filet de fin de page : sépare l'action du lien de retour. */
#team .team-rule {
  display: block;
  width: 32px;
  height: 1px;
  margin-top: 22px;
  background: var(--line);
}

/* Retour discret, mais lisible et cliquable (44 px). */
#team .company-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 2px;
  padding-inline: 8px;
  color: #61707e;
  font-size: 13px;
  letter-spacing: -.006em;
  border-radius: 8px;
  transition: color .2s cubic-bezier(.2,.7,.2,1);
}
#team .company-back span { border-bottom: 1px solid transparent; padding-bottom: 1px; transition: border-color .2s cubic-bezier(.2,.7,.2,1); }
#team .company-back .company-back-arrow { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
#team .company-back:hover { color: var(--blue); }
#team .company-back:hover span { border-bottom-color: rgba(0, 122, 255, .35); }
#team .company-back:hover .company-back-arrow { transform: translateX(-3px); }

/* ---------- Entrée chorégraphiée : titre → support → scène → bouton → fin ---------- */
.js #team .reveal { transition-duration: .62s; }
.js #team .collaboration-subtitle { transition-delay: 90ms; }
.js #team .collaboration-art { transform: translateY(24px); transition-duration: .78s; transition-delay: 160ms; }
.js #team .collaboration-art.is-visible { transform: none; }
.js #team .company-final-action .btn-primary { transform: translateY(18px) scale(.985); transition: opacity .6s cubic-bezier(.2,.7,.2,1) 300ms, transform .6s cubic-bezier(.2,.7,.2,1) 300ms, background .2s, box-shadow .2s; }
.js #team .company-final-action .btn-primary.is-visible { transform: none; }
.js #team .company-final-action .availability { transition-delay: 380ms; }
.js #team .team-rule { transition-delay: 440ms; }
.js #team .company-back { transition-delay: 480ms; }

/* ---------- Portables courts : on resserre pour que le lien de retour
   reste dans le dernier écran, sans toucher au cadrage de l'aquarelle. --- */
@media (min-width: 761px) and (max-height: 860px) {
  .company-page #team { padding: 40px 0 40px; }
  #team .collaboration-art { margin-top: 16px; }
  #team .company-final-action { margin-top: 8px; }
  #team .team-rule { margin-top: 18px; }
}

/* ---------- Mobile 390 ---------- */
@media (max-width: 760px) {
  .company-page #team { padding: 56px 0 48px; }
  #team .collaboration-copy.content { padding-inline: 24px; }
  #team h2 { font-size: clamp(2.05rem, 8.2vw, 3.6rem); letter-spacing: -.038em; }
  #team .collaboration-subtitle { margin: 18px auto 0; max-width: 20em; font-size: 15px; }
  #team .collaboration-art {
    width: 100%;
    height: 210px;
    margin-top: 20px;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%),
      linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
    mask-image:
      linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%),
      linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
  }
  #team .collaboration-art img { width: 486px; left: calc(50% - 250px); top: -61px; }
  #team .company-final-action { margin-top: 12px; padding-inline: 28px; }
  #team .company-final-action .btn-primary { width: 100%; max-width: 320px; }
  #team .company-final-action .availability { margin-top: 16px; font-size: 12.5px; }
  #team .team-rule { margin-top: 22px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .js #team .reveal,
  .js #team .collaboration-art,
  .js #team .company-final-action .btn-primary { opacity: 1; transform: none; transition: none; }
  #team .collaboration-art img { transform: none !important; }
}
