/* GP Service — feuille de style
   Les animations sont pilotées par la variable --p (0 → 1), mise à jour par main.js
   selon la position de défilement de chaque section [data-scene]. */

:root {
  --ink: #031d3d;
  --ink-2: #3a4a66;
  --paper: #f4efe6;
  --paper-2: #e9e1d2;
  --accent: #b48834;
  --accent-light: #d6b06a;
  --accent-ink: #8c661d;
  --radius: 28px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-ink); }
[data-scene] { --p: 0; }

.wrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }
.kicker {
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-2); margin-bottom: 1rem;
}
h2 { font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 800; }

/* Boutons */
.btn {
  display: inline-block; padding: .95rem 1.5rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700;
  transition: transform .25s, background .25s;
}
.btn:hover, .btn:focus-visible { background: var(--accent-ink); transform: translateY(-2px); }
.btn-small { padding: .6rem 1.1rem; font-size: .9rem; white-space: nowrap; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover, .btn-light:focus-visible { background: var(--accent); color: var(--ink); }
.link-arrow { font-weight: 700; text-underline-offset: .3em; }
.link-arrow::after { content: " →"; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Barre de progression et halo qui suit la souris */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 60; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--scroll, 0)); }
.blob {
  position: fixed; left: 0; top: 0; width: 34vmax; height: 34vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,136,52,.24), rgba(180,136,52,0) 65%);
  transform: translate(calc(var(--bx, 50vw) - 50%), calc(var(--by, 30vh) - 50%));
  pointer-events: none; z-index: 0;
}

/* En-tête */
.top {
  position: fixed; inset: 4px 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: .9rem clamp(1rem, 3vw, 2.5rem);
  transition: background .3s, box-shadow .3s;
}
.top.is-scrolled { background: rgba(244,239,230,.86); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(14,26,48,.08); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-logo { height: 68px; width: auto; transition: transform .4s, height .3s; }
.brand:hover .brand-logo { transform: scale(1.04); }
.top.is-scrolled .brand-logo { height: 54px; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; font-size: .95rem; font-weight: 600; }
.nav a { text-decoration: none; position: relative; padding: .2rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s; }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

/* 1. Accueil */
.hero { height: 230vh; position: relative; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; align-items: center; }
.hero-bgword {
  position: absolute; left: 0; bottom: -4vw; white-space: nowrap;
  font-size: 26vw; font-weight: 900; letter-spacing: -.05em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(14,26,48,.13);
  transform: translateX(calc(8vw - var(--p) * 60vw));
}
.hero-portrait {
  position: absolute; right: 7vw; top: 50%;
  width: min(30vw, 62vh); aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(14,26,48,.55);
  transform: translate(calc(var(--p) * -24vw), calc(-50% + var(--p) * 2vh)) scale(calc(1 + var(--p) * .38)) rotate(calc((1 - var(--p)) * 3deg));
  z-index: 1;
}
.hero-portrait img { width: 100%; height: 118%; object-fit: cover; transform: translateY(calc(var(--p) * -13%)); }
.hero-text { position: relative; z-index: 2; padding-inline: clamp(1.5rem, 7vw, 7rem); max-width: 100%; opacity: calc(1 - var(--p) * 1.7); }
h1 { font-size: clamp(2.7rem, 7.8vw, 8rem); line-height: .93; letter-spacing: -.045em; font-weight: 900; margin-bottom: 1.6rem; }
h1 .line { display: block; white-space: nowrap; }
h1 .l1 { transform: translateX(calc(var(--p) * -34vw)); }
h1 .l2 { transform: translateX(calc(var(--p) * 30vw)); padding-left: 6vw; }
.lead { max-width: 30rem; font-size: 1.12rem; color: var(--ink-2); margin-bottom: 1.8rem; transform: translateY(calc(var(--p) * 60px)); }
.hero-cta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; transform: translateY(calc(var(--p) * 90px)); }

.chips { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.chips li {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  padding: .5rem 1rem; border-radius: 999px; font-size: .86rem; font-weight: 700; white-space: nowrap;
  background: #fff; box-shadow: 0 10px 30px -12px rgba(14,26,48,.45);
  transform: translate(calc(-50% + var(--mx, 0) * var(--d) * 26px), calc(var(--my, 0) * var(--d) * 26px - var(--p) * var(--d) * 46vh));
}
.chips li:nth-child(even) { background: var(--ink); color: var(--paper); }
.chips li:nth-child(3n) { background: var(--accent); color: #fff; }

.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: .5rem; opacity: calc(1 - var(--p) * 6); }
.scroll-hint span { width: 1px; height: 38px; background: var(--ink); animation: drop 1.8s infinite; transform-origin: 50% 0; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes drop { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* 2. Bandeau */
.marquee { background: var(--ink); color: var(--paper); overflow: hidden; padding: 1.3rem 0; position: relative; z-index: 2; transform: rotate(-1.2deg) scale(1.03); }
.marquee-track { display: flex; width: max-content; will-change: transform; transform: translateX(var(--mq, 0px)); }
.marquee-track span { font-size: clamp(1.3rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; padding-right: 1.5rem; white-space: nowrap; }
.marquee-track span::after { content: "✦"; color: var(--accent); padding-left: 1.5rem; }

/* 3. Services : défilement horizontal */
.hscroll { position: relative; height: 400vh; }
.hscroll-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 2.2rem; padding-top: 4.5rem; }
.hscroll-head { padding-inline: clamp(1.5rem, 7vw, 7rem); }
.hscroll-bar { margin-top: 1.4rem; height: 3px; width: min(320px, 60vw); background: rgba(14,26,48,.12); border-radius: 3px; overflow: hidden; }
.hscroll-bar span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p)); }
.hscroll-track { display: flex; gap: 1.6rem; padding-inline: clamp(1.5rem, 7vw, 7rem); width: max-content; will-change: transform; transform: translateX(var(--tx, 0px)); }
.card {
  position: relative; flex: none; width: min(78vw, 400px); min-height: min(52vh, 430px);
  padding: 2rem; border-radius: var(--radius); background: #fff;
  box-shadow: 0 30px 60px -40px rgba(14,26,48,.5);
  display: flex; flex-direction: column;
  transition: transform .35s, box-shadow .35s;
}
.card:nth-child(even) { translate: 0 2.2rem; }
.card:hover { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 40px 70px -35px rgba(14,26,48,.6); }
.card .num { font-family: var(--serif); font-style: italic; font-size: 3.4rem; line-height: 1; color: var(--accent); margin-bottom: 1.2rem; }
.card h3 { font-size: 1.55rem; line-height: 1.1; letter-spacing: -.02em; }
.card .for { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); margin: .5rem 0 1.2rem; font-weight: 600; }
.card li { padding: .55rem 0 .55rem 1.3rem; border-top: 1px solid rgba(14,26,48,.1); position: relative; font-size: .97rem; }
.card li::before { content: ""; position: absolute; left: 0; top: 1.1rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.card-lead { background: var(--ink); color: var(--paper); width: min(84vw, 460px); }
.card-lead .for { color: #b9c2d6; }
.card-lead li { border-color: rgba(244,239,230,.16); }
.card-cta { background: var(--accent); justify-content: center; gap: 1.2rem; align-items: flex-start; }
.card-cta h3 { font-size: 1.9rem; }

/* 4. Pour qui */
.who { padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 9vw, 8rem); overflow: hidden; }
.who-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; width: min(1180px, 100% - 3rem); margin: 3rem auto 0; }
.panel { padding: clamp(1.8rem, 4vw, 3.2rem); border-radius: var(--radius); background: var(--paper-2); }
.panel h3 { font-size: clamp(1.8rem, 3.6vw, 3rem); letter-spacing: -.03em; line-height: 1; margin-bottom: 1rem; }
.panel p { color: var(--ink-2); margin-bottom: 1.4rem; max-width: 32rem; }
.panel li { padding: .6rem 0; border-top: 1px solid rgba(14,26,48,.14); font-weight: 600; }
.panel-right { background: var(--ink); color: var(--paper); }
.panel-right p { color: #c5cddd; }
.panel-right li { border-color: rgba(244,239,230,.18); }
.js .panel-left { transform: translateX(calc((1 - var(--p)) * -55vw)) rotate(calc((1 - var(--p)) * -6deg)); }
.js .panel-right { transform: translateX(calc((1 - var(--p)) * 55vw)) rotate(calc((1 - var(--p)) * 6deg)); }

/* 5. Méthode */
.method { padding: clamp(4rem, 9vw, 8rem) 0; }
.method-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.method-head { position: sticky; top: 22vh; }
.method-head p:last-child { margin-top: 1.2rem; color: var(--ink-2); font-size: 1.1rem; }
.steps { position: relative; padding-left: 3.2rem; counter-reset: s; }
.steps::before, .steps::after { content: ""; position: absolute; left: 13px; top: .6rem; bottom: .6rem; width: 2px; background: rgba(14,26,48,.13); }
.steps::after { background: var(--accent); transform-origin: 50% 0; transform: scaleY(clamp(0, calc(var(--p) * 2.1 - .42), 1)); }
.step { position: relative; padding: 0 0 clamp(3rem, 9vh, 6rem); counter-increment: s; }
.step:last-child { padding-bottom: 0; }
.step .dot { position: absolute; left: -3.2rem; top: .15rem; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 2px solid rgba(14,26,48,.2); z-index: 1; transition: background .4s, border-color .4s, transform .4s; }
.step h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); letter-spacing: -.02em; line-height: 1.1; margin-bottom: .5rem; }
.step h3::before { content: "0" counter(s) " "; font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-ink); }
.step p { color: var(--ink-2); max-width: 30rem; }
.js .step { opacity: .28; transform: translateX(40px); transition: opacity .6s, transform .6s; }
.js .step.is-in { opacity: 1; transform: none; }
.step.is-in .dot { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }

/* 6. À propos */
.about { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--paper-2); position: relative; z-index: 1; }
.about-grid { display: grid; grid-template-columns: .85fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.js .about-photo { clip-path: inset(calc(clamp(0, 1 - var(--p) * 2.4, 1) * 38%) round var(--radius)); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.js .about-photo img { transform: scale(calc(1.35 - clamp(0, var(--p) * 1.6, 1) * .35)); }
.about-text > p { margin-top: 1.2rem; font-size: 1.08rem; color: var(--ink-2); max-width: 34rem; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.values li { padding-top: .9rem; border-top: 2px solid var(--ink); font-size: .92rem; color: var(--ink-2); }
.values b { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: .2rem; }
.about-text > p.note { font-size: .88rem; margin-top: 2rem; padding-left: 1rem; border-left: 3px solid var(--accent); }

/* 7. Contact */
.contact { background: var(--ink); color: var(--paper); padding: clamp(5rem, 12vw, 10rem) 0; position: relative; overflow: hidden; z-index: 1; }
.contact .kicker { color: #b9c2d6; }
.contact em { color: var(--accent-light); }
.contact h2 { font-size: clamp(2.6rem, 8vw, 7.5rem); }
.contact-word { position: absolute; top: 1.2rem; left: 0; white-space: nowrap; font-size: 15vw; font-weight: 900; letter-spacing: -.04em; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(244,239,230,.12); transform: translateX(calc(var(--p) * -45vw)); }
.contact .wrap { position: relative; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 3rem; }
.big { display: block; padding: 1.6rem 0; border-top: 2px solid rgba(244,239,230,.3); text-decoration: none; font-size: clamp(1.25rem, 2.7vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; transition: color .25s, border-color .25s, padding-left .3s; }
.big small { display: block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: #b9c2d6; margin-bottom: .4rem; }
.big:hover, .big:focus-visible { color: var(--accent-light); border-color: var(--accent-light); padding-left: .8rem; }
.zone { margin-top: 2rem; color: #c5cddd; }

/* Pied de page */
.foot { background: var(--ink); color: #c5cddd; padding: 1.6rem 0 2rem; border-top: 1px solid rgba(244,239,230,.14); font-size: .9rem; position: relative; z-index: 1; }
.foot-row { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.foot-logo { height: 46px; width: auto; }

/* Page de texte (mentions légales) */
.page { padding: 9rem 0 5rem; position: relative; z-index: 1; }
.page h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 2rem; }
.page h2 { font-size: 1.4rem; letter-spacing: -.01em; margin: 2.2rem 0 .6rem; }
.page p { max-width: 44rem; color: var(--ink-2); margin-bottom: .6rem; }
.todo { background: #fff3c4; padding: 0 .3em; border-radius: 4px; color: var(--ink); }

/* Écrans étroits */
@media (max-width: 860px) {
  .nav { display: none; }
  .top { justify-content: space-between; }
  /* Accueil : sur petit écran, la photo, le texte et les étiquettes se suivent sans se superposer */
  .hero { height: auto; }
  .hero-sticky { position: static; height: auto; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; padding: 6.2rem 0 3rem; }
  .hero-bgword { display: none; }
  .hero-portrait { position: relative; right: auto; top: auto; order: 1; width: min(64vw, 300px); margin: 0 auto 1.8rem; transform: none; animation: rise .9s both; }
  .hero-portrait img { height: 100%; transform: none; }
  .hero-text { order: 2; opacity: 1; padding-inline: 1.5rem; animation: rise .9s .15s both; }
  h1 { font-size: clamp(2.3rem, 10.5vw, 3.6rem); }
  h1 .line { white-space: normal; }
  h1 .l1, h1 .l2 { transform: none; padding-left: 0; }
  .lead { font-size: 1rem; transform: none; }
  .hero-cta { transform: none; }
  .chips { order: 3; position: static; display: flex; flex-wrap: wrap; gap: .5rem; padding: 2rem 1.5rem 0; pointer-events: auto; animation: rise .9s .3s both; }
  .chips li { position: static; transform: none; font-size: .8rem; padding: .45rem .85rem; box-shadow: 0 6px 18px -10px rgba(14,26,48,.45); }
  .brand-logo, .top.is-scrolled .brand-logo { height: 46px; }
  .top { gap: .8rem; }
  .scroll-hint { display: none; }
  .who-panels, .method-grid, .about-grid, .contact-links { grid-template-columns: 1fr; }
  .method-head { position: static; }
  .js .step { opacity: .5; transform: none; }
  .js .step.is-in { opacity: 1; }
  .values { grid-template-columns: 1fr; }
  .card:nth-child(even) { translate: 0 0; }
  .blob { display: none; }
}

/* Mouvement réduit ou JavaScript absent : tout reste lisible, sans animation */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .hscroll { height: auto; }
  .hero-sticky, .hscroll-sticky { position: static; height: auto; min-height: 100vh; padding-block: 6rem 3rem; }
  .hscroll-track { overflow-x: auto; width: auto; padding-bottom: 3rem; }
  .scroll-hint span { animation: none; }
  .hero-portrait, .hero-text, .chips { animation: none; }
  .blob, .hscroll-bar { display: none; }
  .js .step { opacity: 1; transform: none; }
  .js .panel-left, .js .panel-right, .js .about-photo, .js .about-photo img { transform: none; clip-path: none; }
}

@media (max-width: 380px) {
  .brand-logo, .top.is-scrolled .brand-logo { height: 38px; }
  .btn-small { padding: .5rem .85rem; font-size: .82rem; }
}
