/* ==========================================================================
   Page d'accueil — Pierre Vergeat
   Le hero reprend la composition de la maquette (1440 × 1160) :
   chaque position est exprimée en cqw (1 cqw = 1 % de la largeur du hero, 14,4 px à 1440).
   ========================================================================== */

/* ===================== HERO ===================== */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.home-hero { position: relative; overflow: hidden; background: var(--cream); }
.home-hero .site-nav { z-index: 30; }

.stage {
  position: relative;
  container-type: inline-size;
  width: 100%; max-width: 1440px; margin: 0 auto;
  aspect-ratio: 1440 / 1076; /* hauteur de la maquette sous la nav */
}
.stage > *, .duo > * { position: absolute; }

.stage .eyebrow { left: 5.556cqw; top: 4.583cqw; font-size: 14px; }
.stage .hero-facts { right: 5.486cqw; top: 4.375cqw; }

.hero-name {
  margin: 0;
  font: 800 20.139cqw/0.82 var(--font-display);
  letter-spacing: -0.05em;
  font-variation-settings: "opsz" 96;
}
.hero-name span { position: absolute; white-space: nowrap; }
.hero-name .first { left: 4.861cqw; top: 6.528cqw; color: var(--violet); }
.hero-name .last { left: 20.208cqw; top: 22.153cqw; color: var(--ink); }
.hero-name { position: static; }

.mockup {
  left: 56.389cqw; top: 6.389cqw; width: 22.917cqw; aspect-ratio: 330 / 232;
  border: var(--line-bold); border-radius: 28px; box-shadow: var(--shadow-m);
  overflow: hidden; background: var(--white);
  z-index: 6; pointer-events: none;
  will-change: transform;
}
.mockup img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.mockup img.is-on { visibility: visible; }

.hero-sticker {
  left: 8.75cqw; top: 18.958cqw; width: 10.417cqw; aspect-ratio: 1;
  border-radius: 50%; background: var(--yellow); border: var(--line-bold); box-shadow: 0 6px 0 var(--ink);
  display: grid; place-content: center; text-align: center; gap: 2px;
  transform: rotate(-14deg); z-index: 4;
}
.hero-sticker .mono { font-size: max(9px, 0.764cqw); }
.hero-sticker strong { font: 800 max(15px, 1.528cqw)/0.95 var(--font-display); letter-spacing: -0.02em; }
.hero-sticker svg { width: max(11px, 1.1cqw); height: max(11px, 1.1cqw); margin: 4px auto 0; }

.hero-statement {
  left: 5.556cqw; top: 43.611cqw; width: 38.889cqw;
  font: 500 clamp(18px, 1.667cqw, 24px)/1.45 var(--font-body);
}
.hero-statement strong { font-weight: 700; }
.hero-statement .serif { color: var(--violet); font-size: 1.21em; }

.hero-ctas { left: 46.667cqw; top: 45.417cqw; display: flex; gap: 16px; align-items: center; }
.btn--lg { font-size: 17px; padding: 16px 28px; }
.btn--outline { border: 2px solid var(--ink); color: var(--ink); padding: 14px 26px; }
.btn--outline:hover { background: var(--ink); color: var(--cream); }

/* Bandes défilantes */
.hband {
  left: calc(50% - 60vw); width: 120vw;
  transform: translateY(-50%) rotate(var(--angle));
  overflow: hidden; padding-block: max(10px, 1.1cqw);
}
.hband--violet { top: 61.076cqw; --angle: 2deg; background: var(--violet); color: var(--cream); z-index: 1; }
.hband--yellow { top: 68.68cqw; --angle: -2deg; background: var(--yellow); color: var(--ink); z-index: 2; }
.hband__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.hband--yellow .hband__track { animation-direction: reverse; animation-duration: 46s; }
.hband:hover .hband__track { animation-play-state: paused; }
.hband__group { display: flex; align-items: center; gap: 2.8cqw; padding-right: 2.8cqw; }
.hband__group span {
  font: 800 max(24px, 3.194cqw)/1.2 var(--font-display);
  letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap;
}
.hband__group svg { width: max(16px, 2.08cqw); height: max(16px, 2.08cqw); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Personnage */
.buddy-wrap { left: 71.111cqw; top: 25.556cqw; width: 28.889cqw; z-index: 3; }
.buddy { width: 100%; height: auto; overflow: visible; }

/* --- Animations du personnage --- */
.buddy-hand { transform-box: view-box; transform-origin: 338px 371px; animation: wave 7s var(--ease) infinite 1.2s; }
@keyframes wave {
  0%, 34%, 100% { transform: rotate(0deg); }
  5% { transform: rotate(14deg); }
  10% { transform: rotate(-6deg); }
  15% { transform: rotate(12deg); }
  20% { transform: rotate(-4deg); }
  26% { transform: rotate(6deg); }
}
.buddy-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s linear infinite; }
.buddy-eye + .buddy-eye { animation-delay: 0.04s; }
@keyframes blink {
  0%, 91%, 100% { transform: scaleY(1); }
  93.5% { transform: scaleY(0.08); }
  96% { transform: scaleY(1); }
}
.buddy-tail { transform-box: view-box; transform-origin: 272px 159px; animation: tail 5.8s ease-in-out infinite; }
@keyframes tail {
  0%, 45%, 100% { transform: rotate(0deg); }
  55% { transform: rotate(9deg); }
  65% { transform: rotate(-5deg); }
  75% { transform: rotate(7deg); }
  86% { transform: rotate(-2deg); }
}

/* Curseur remplacé par la maquette au-dessus des bandes */
.home-hero.is-following, .home-hero.is-following * { cursor: none; }
.home-hero.is-following a, .home-hero.is-following button { cursor: pointer; }

/* ---------- Hero tablette / mobile : composition empilée ---------- */
@media (max-width: 959px) {
  .stage { height: auto; aspect-ratio: auto; container-type: normal; padding: 32px var(--gutter) 0; display: flex; flex-direction: column; }
  .stage > * { position: relative; left: auto !important; right: auto !important; top: auto !important; }
  .stage .eyebrow, .stage .hero-facts { order: 0; }
  .stage .hero-facts { margin-top: 8px; }
  .hero-name { order: 1; position: relative; margin-top: 28px; font-size: 25vw; height: calc(25vw * 1.66); }
  .hero-name span { position: absolute; }
  .hero-name .first { left: -0.04em; top: 0; }
  .hero-name .last { left: auto; right: -0.02em; top: calc(25vw * 0.84); }
  .hero-sticker { order: 5; width: 104px; align-self: flex-end; margin-top: -104px; margin-right: 4px; }
  .hero-statement { order: 3; width: auto; margin-top: 28px; font-size: 19px; }
  .hero-ctas { order: 4; margin-top: 24px; flex-wrap: wrap; }
  .duo > * { left: auto !important; top: auto !important; }
  .duo { order: 6; display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 16px; margin-top: 40px; }
  .stage .mockup { position: relative; width: auto; transform: rotate(-3deg); margin-bottom: 30%; }
  .stage .buddy-wrap { position: relative; width: auto; }
  .hband { order: 7; left: -10vw !important; width: 120vw; transform: rotate(var(--angle)); margin-top: -8px; }
  .hband--yellow { margin-top: 18px; margin-bottom: 16px; }
  .hband--violet { margin-top: -24px; }
}
@media (min-width: 960px) {
  .duo { display: contents; }
}

/* ===================== ÉTUDES DE CAS ===================== */
.work { padding-block: 70px 150px; }
@media (max-width: 959px) { .work { padding-top: 48px; } }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 64px; }
.work-head .display { font-size: clamp(64px, 10.4vw, 150px); }
.work-head__meta { width: 340px; flex: none; padding-bottom: 18px; }
.work-head__meta p { font-size: 18px; line-height: 1.5; opacity: .85; }
.cases { display: grid; gap: 64px; }

.case {
  position: relative; display: grid; grid-template-columns: 700fr 580fr; min-height: 600px;
  border: var(--line-bold); border-radius: 44px; box-shadow: var(--shadow-l); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.case--green { background: #12382E; color: var(--cream); }
.case--lavender { background: var(--lavender); color: var(--ink); grid-template-columns: 580fr 700fr; }
.case--lavender .case__visual { order: 2; }
.case__visual { position: relative; overflow: hidden; }
.case__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.case__copy { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 34px 56px; }
.case__num {
  font: 800 150px/0.8 var(--font-display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 2.5px var(--yellow);
}
.case--lavender .case__num { -webkit-text-stroke-color: var(--violet); }
.case__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case__tags li {
  border: 1.5px solid currentColor; border-radius: 100px; padding: 6px 12px;
  font: 500 12px/1.2 var(--font-mono); letter-spacing: .04em; text-transform: uppercase;
}
.case__title { font: 800 clamp(36px, 3.75vw, 54px)/0.98 var(--font-display); letter-spacing: -0.025em; }
.case__desc { font-size: 18px; line-height: 1.5; max-width: 440px; }
.case__cta { align-self: flex-start; }
.btn--case-violet { background: var(--violet); color: var(--cream); padding: 16px 28px; font-size: 16px; box-shadow: var(--shadow-s); }
.btn--case-yellow { background: var(--yellow); color: var(--ink); padding: 16px 28px; font-size: 16px; box-shadow: var(--shadow-s); }
.btn--soon { background: #FDFDFF; color: var(--ink); padding: 16px 28px; font-size: 16px; cursor: default; }
.case__cta::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* toute la carte est cliquable */
.case__badge {
  position: absolute; z-index: 2; top: 36px; width: 120px; height: 120px; border-radius: 50%;
  border: var(--line-bold); box-shadow: var(--shadow-s);
  display: grid; place-content: center; justify-items: center; gap: 2px; pointer-events: none;
  transition: transform .4s var(--ease);
}
.case--green .case__badge { left: calc(700 / 1280 * 100% - 86px); background: var(--yellow); color: var(--ink); }
.case--lavender .case__badge { left: calc(580 / 1280 * 100% - 60px); background: var(--violet); color: var(--cream); transform: rotate(-1deg); }
.case__badge .mono { font-size: 12px; }
.case__badge svg { width: 30px; height: 30px; }
a.case__cta:hover ~ .case__badge, .case:has(a.case__cta:hover) .case__badge { transform: rotate(12deg) scale(1.05); }
.case:has(a.case__cta:hover) { transform: translateY(-3px); box-shadow: 0 13px 0 var(--ink); }
.case:has(a.case__cta:hover) .case__visual img { transform: scale(1.03); }

@media (max-width: 1024px) {
  .work-head { flex-direction: column; align-items: flex-start; }
  .work-head__meta { width: auto; padding-bottom: 0; }
  .case, .case--lavender { grid-template-columns: 1fr; min-height: 0; border-radius: 32px; }
  .case--lavender .case__visual { order: 0; }
  .case__visual { aspect-ratio: 7 / 6; max-height: 520px; }
  .case__copy { padding: 32px; }
  .case__num { font-size: 110px; }
  .case--green .case__badge, .case--lavender .case__badge { left: auto; right: 24px; top: 24px; width: 96px; height: 96px; }
}
@media (max-width: 520px) {
  .case__copy { padding: 26px 22px 30px; }
  .case__num { font-size: 84px; }
  .case__desc { font-size: 16px; }
}

/* ===================== À PROPOS ===================== */
.about { background: var(--ink); color: var(--cream); padding-block: 140px 150px; }
.about__labels { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 72px; }
.about__labels .mono:last-child { opacity: .6; }
.about__statement { font-size: clamp(48px, 7.8vw, 112px); max-width: 1200px; margin-bottom: 72px; }
.about__statement .hl { color: var(--lilac); }
.about__statement .serif { color: var(--yellow); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 72px; }
.stat {
  background: var(--ink-2); border: 1.5px solid var(--cream); border-radius: 36px; padding: 36px;
  display: grid; align-content: start; gap: 14px;
}
.stat__num { font: 800 150px/0.9 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat:nth-child(1) .stat__num { color: var(--yellow); }
.stat:nth-child(2) .stat__num { color: var(--lilac); }
.stat p:last-child { font-size: 18px; line-height: 1.5; opacity: .8; }
.refs .mono { opacity: .6; margin-bottom: 20px; }
.refs__names { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; row-gap: 0; }
.refs__names span { font: 800 clamp(44px, 5.83vw, 84px)/1.05 var(--font-display); letter-spacing: -0.03em; }
.refs__names .outline { color: transparent; -webkit-text-stroke: 1.6px var(--cream); }
.refs__names svg { width: clamp(22px, 2.4vw, 34px); height: clamp(22px, 2.4vw, 34px); color: var(--yellow); }
/* Deuxième liste, plus discrète : même traitement en 20 px */
.refs__names--sm { margin-top: 24px; column-gap: 14px; row-gap: 6px; }
.refs__names--sm span { font-size: 20px; line-height: 1.3; letter-spacing: 0; }
.refs__names--sm svg { width: 13px; height: 13px; }
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr; }
  .stat__num { font-size: 110px; }
  .about__labels { flex-direction: column; gap: 8px; margin-bottom: 48px; }
}

/* ===================== CE QUE JE FAIS ===================== */
.services { padding-block: 150px 160px; }
.services-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 64px; }
.services-head .display { font-size: clamp(64px, 10.4vw, 150px); }
.services-head .mono { padding-bottom: 18px; }
.service {
  display: grid; grid-template-columns: 70px 1fr 320px; align-items: center; gap: 24px;
  padding: 34px 28px;
  border-top: 2px solid var(--ink);
  border-radius: 0;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-radius .3s var(--ease), border-color .3s var(--ease);
}
.service:last-child { border-bottom: 2px solid var(--ink); }
.service .mono { font-size: 16px; }
.service h3 { font: 800 clamp(36px, 4.6vw, 66px)/1 var(--font-display); letter-spacing: -0.025em; }
.service p { font-size: 18px; line-height: 1.45; opacity: .85; }
/* Survol : le style « Design systems » de la maquette */
.service:hover { background: var(--violet); color: var(--cream); border-radius: 28px; border-color: transparent; }
.service:hover + .service { border-top-color: transparent; }
.service:hover .mono { color: var(--yellow); }
@media (max-width: 900px) {
  .services-head { flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
  .service { grid-template-columns: 44px 1fr; row-gap: 8px; padding: 26px 16px; }
  .service p { grid-column: 2; grid-row: 2; }
}

/* ===================== CONTACT ===================== */
.contact { position: relative; overflow: hidden; background: var(--violet); color: var(--cream); padding-block: 140px 160px; }
.contact .wrap { position: relative; }
.contact__star {
  position: absolute; width: 520px; right: -10px; top: -70px; color: var(--yellow);
  animation: spin 80s linear infinite;
}
.contact__ring {
  position: absolute; width: 760px; height: 760px; left: -300px; top: 190px;
  border: 2px solid rgba(246, 241, 231, .28); border-radius: 50%; pointer-events: none;
}
.contact__label { position: relative; margin-bottom: 40px; }
.contact__title { position: relative; display: grid; }
.contact__title .l1 { font: 800 clamp(64px, 13.2vw, 190px)/0.88 var(--font-display); letter-spacing: -0.05em; }
.contact__title .l2 { font-family: var(--font-serif); font-style: italic; font-size: clamp(80px, 17.4vw, 250px); line-height: .9; letter-spacing: -0.03em; color: var(--yellow); margin-top: 10px; }
.contact__actions { position: relative; display: flex; flex-wrap: wrap; gap: 20px; margin-top: 40px; }
.contact__actions .btn { font-size: 24px; padding: 24px 44px; }
.contact__actions .btn--yellow { box-shadow: var(--shadow-m); }
.contact__actions .btn--yellow:hover { box-shadow: 0 10px 0 var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .contact { padding-block: 100px 110px; }
  .contact__star { width: 240px; right: -90px; top: -60px; }
  .contact__actions .btn { font-size: 18px; padding: 16px 28px; }
}

/* ===================== MOUVEMENT RÉDUIT ===================== */
@media (prefers-reduced-motion: reduce) {
  .hband__track, .buddy-hand, .buddy-eye, .buddy-tail, .contact__star { animation: none; }
}

/* ===================== CURSEUR « VOIR » SUR LES ÉTUDES DE CAS ===================== */
.case.is-cursor, .case.is-cursor * { cursor: none !important; }
.case__badge.is-following { transition: none; z-index: 3; }

/* ===================== APPARITIONS ===================== */
/* Mots qui montent depuis un masque */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .12em 0; margin: 0 -.06em -.12em 0; }
[data-split] .wi { display: inline-block; }
.js [data-split] .wi { transform: translateY(115%); }
.is-in[data-split] .wi, .is-in [data-split] .wi { transform: none; transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 55ms); }

/* À propos */
.js .about .stat, .js .about .refs { opacity: 0; transform: translateY(28px); }
.about.is-in .stat, .about.is-in .refs { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.about.is-in .stat:nth-child(1) { transition-delay: .55s; }
.about.is-in .stat:nth-child(2) { transition-delay: .65s; }
.about.is-in .stat:nth-child(3) { transition-delay: .75s; }
.about.is-in .refs { transition-delay: .9s; }
.js .refs__names > * { display: inline-block; opacity: 0; transform: translateX(-24px); }
.about.is-in .refs__names > * { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(1s + var(--i) * 70ms); }

/* Contact */
.js .contact__title .l2 { opacity: 0; transform: translateX(-40px) rotate(-4deg); transform-origin: left bottom; }
.contact.is-in .contact__title .l2 { opacity: 1; transform: none; transition: opacity .9s var(--ease) .45s, transform 1s var(--ease) .45s; }
.js .contact__star { scale: 0; }
.contact.is-in .contact__star { scale: 1; transition: scale 1.1s cubic-bezier(.34, 1.56, .64, 1) .15s; }
.js .contact__ring { opacity: 0; transform: scale(.7); }
.contact.is-in .contact__ring { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .3s, transform 1.4s var(--ease) .3s; }
.js .contact__actions .btn { opacity: 0; transform: translateY(20px); }
.contact.is-in .contact__actions .btn { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.contact.is-in .contact__actions .btn:nth-child(1) { transition-delay: .8s, .8s, 0s, 0s; }
.contact.is-in .contact__actions .btn:nth-child(2) { transition-delay: .9s, .9s, 0s, 0s; }
.contact.is-in .contact__actions .btn:hover { transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  .js [data-split] .wi, .js .about .stat, .js .about .refs, .js .refs__names > *,
  .js .contact__title .l2, .js .contact__ring, .js .contact__actions .btn { opacity: 1 !important; transform: none !important; }
  .js .contact__star { scale: 1 !important; }
}

/* ===================== « CLAIR » FLOU, NET AU SURVOL ===================== */
/* Le flou est posé sur le masque du mot (.w) pour ne pas être rogné par l'animation d'apparition. */
.about__statement .w:has(.serif) {
  filter: blur(9px);
  transition: filter .6s var(--ease);
}
@media (hover: hover) {
  .about__statement .w:has(.serif):hover { filter: blur(0); }
}
/* Écrans tactiles : le mot devient net tout seul, peu après l'apparition du titre */
@media (hover: none) {
  .about.is-in .about__statement .w:has(.serif) { filter: blur(0); transition: filter 1s var(--ease) 1.8s; }
}
@media (prefers-reduced-motion: reduce) {
  .about__statement .w:has(.serif) { transition: none; }
}
