/* Hallmark · macrostructure: Split Studio · H2 hero knobs: ratio=7/5, right=proof-column, divider=negative-space
 * theme: custom · vibe: "studio Android, vert signal, précis accessible" · paper: oklch(98% 0.006 230) · accent: oklch(60% 0.15 160)
 * display: Space Grotesk · body: Geist · axes: light / grotesk-sans / chromatic-green (~160°)
 * genre: modern-minimal · nav: N5 floating pill · footer: Ft5 statement
 * enrichment: E5 tier-B hand-built SVG (10 pictos portfolio · workflow diagram · drawn underline)
 * animation: entrance+underline-draw · flow-dash loop · hover feedback (3 primitives)
 * studied: no · context: user-provided · v1.1.0
 */
/* Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4 */
@import url("tokens.css");

* { box-sizing: border-box; margin: 0; }

html { overflow-x: clip; scroll-behavior: smooth; }
body {
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  padding-inline: max(var(--page-gutter), env(safe-area-inset-left));
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  min-width: 0;
}

p { max-width: 65ch; }
a { color: inherit; }

.wrap { max-width: var(--page-max); margin-inline: auto; padding-top: var(--space-3xl); }

/* Accès clavier */
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
.skip-link {
  position: absolute; inset: var(--space-xs) auto auto var(--space-xs);
  background: var(--color-ink); color: var(--color-paper);
  padding: var(--space-xs) var(--space-md); border-radius: var(--radius-sm);
  transform: translateY(-300%); z-index: var(--z-sticky);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Nav · N5 floating pill ---------- */
.nav {
  position: fixed; inset: var(--space-md) auto auto 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: var(--space-lg);
  padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-md);
  background: color-mix(in oklch, var(--color-paper) 80%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  z-index: var(--z-sticky);
  white-space: nowrap;
}
.nav__brand { display: flex; align-items: center; }
.nav__brand img { height: 26px; width: auto; display: block; }
.nav__links { display: flex; gap: var(--space-lg); list-style: none; padding: 0; }
.nav__links a {
  text-decoration: none; font-size: var(--text-sm); font-weight: 600;
  color: var(--color-ink-2);
}
.nav__links a:hover { color: var(--color-accent-deep); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base);
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.btn--fill { background: var(--color-ink); color: var(--color-paper); }
.btn--fill:hover { background: var(--color-ink-2); transform: translateY(-1.5px); }
.btn--fill:active { transform: translateY(1px); }
.nav__cta { min-height: 38px; padding-block: var(--space-xs); font-size: var(--text-sm); }
@media (pointer: coarse) { .nav__cta { min-height: 44px; } }

.cta-outline {
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 44px; padding: var(--space-sm) var(--space-lg);
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: var(--radius-pill);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.cta-outline:hover { background: var(--color-paper-2); transform: translateY(-1.5px); }
.cta-outline:active { transform: translateY(1px); }

.link-arrow {
  font-weight: 600; text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-3xs);
}
.link-arrow:hover { color: var(--color-accent-deep); }

/* ---------- Hero · diptyque 7/5 ---------- */
.hero {
  display: grid; grid-template-columns: 7fr 5fr;
  gap: var(--space-2xl); align-items: center;
  /* le dégagement de la nav fixe vit sur .wrap ; ici bas > haut (gate 44) */
  padding-block: var(--space-xl) var(--space-3xl);
}
.hero h1 { font-size: var(--text-display); }
.hero__lede { margin-top: var(--space-lg); color: var(--color-ink-2); font-size: var(--text-md); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); margin-top: var(--space-xl); }

.hero__proof { display: grid; gap: var(--space-xl); justify-self: end; }
.proof { display: grid; gap: var(--space-2xs); max-width: 22ch; }
.proof__n {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-2xl); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.proof__n::after {
  content: ""; display: block; width: 2rem; height: 3px;
  background: var(--color-accent); margin-top: var(--space-xs);
}
.proof__q { color: var(--color-muted); font-size: var(--text-sm); }

/* Soulignement tracé — emphase du verbe du titre */
.u-draw { position: relative; white-space: nowrap; }
.u-draw svg {
  position: absolute; left: 0; bottom: -0.05em;
  width: 100%; height: 0.13em; overflow: visible;
}
.u-draw path {
  fill: none; stroke: var(--color-accent);
  stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: draw-u 500ms var(--ease-out) 650ms forwards;
}
@keyframes draw-u { to { stroke-dashoffset: 0; } }

/* Entrée orchestrée — hero uniquement */
.reveal {
  animation: reveal var(--dur-long) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
/* l'état initial vit dans le keyframe : sans animation, le contenu reste visible */
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Sections ---------- */
section { scroll-margin-top: 6rem; }
.head-hang { padding-block: var(--space-3xl) var(--space-xl); }
.head-hang h2 { font-size: var(--text-display-s); }
.head-hang h2::before {
  content: ""; display: inline-block; width: 0.5em; height: 0.5em;
  background: var(--color-accent); margin-right: 0.45em;
  border-radius: 2px;
}
.head-hang p { margin-top: var(--space-sm); color: var(--color-muted); }

/* ---------- Réalisations · grille produits ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr));
  gap: var(--space-xl) var(--space-lg);
  list-style: none; padding: 0 0 var(--space-2xl);
}
.product a { display: grid; gap: var(--space-xs); text-decoration: none; }
.product__tile {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-md);
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--text-xl); color: var(--color-ink-2);
  transition: background-color var(--dur-short) var(--ease-out),
              transform var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              box-shadow var(--dur-short) var(--ease-out);
}
.product a:hover .product__tile {
  background: var(--color-paper-3);
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-soft);
}
.product__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.product__name { font-weight: 600; line-height: 1.3; }
.product__meta { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- Formation · diptyque inversé + étapes ---------- */
.training {
  display: grid; grid-template-columns: 5fr 6fr;
  grid-template-areas: "flow flow" "steps text";
  gap: var(--space-lg) var(--space-2xl);
  padding-block: var(--space-2xl) var(--space-3xl);
  border-top: var(--rule-hair) solid var(--color-rule);
}

/* Diagramme de flux — SVG fait main (Tier B) */
.flow { grid-area: flow; display: block; width: 100%; max-width: 46rem; height: auto; }
.flow__box { fill: var(--color-paper-2); stroke: var(--color-rule); stroke-width: 1.5; }
.flow__box--mid {
  fill: color-mix(in oklch, var(--color-paper-2) 92%, var(--color-accent) 8%);
  stroke: color-mix(in oklch, var(--color-accent) 45%, var(--color-rule));
}
.flow__name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; fill: var(--color-ink); }
.flow__sub { font-family: var(--font-body); font-size: 13px; fill: var(--color-muted); }
.flow__arrow { fill: none; stroke: var(--color-rule); stroke-width: 1.6; stroke-linecap: round; }
.flow__arrow--live { stroke: var(--color-accent); stroke-dasharray: 5 5; animation: flow-dash 1.8s linear infinite; }
.flow__head { fill: none; stroke: var(--color-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.flow__head--live { stroke: var(--color-accent); }
@keyframes flow-dash { to { stroke-dashoffset: -20; } }
.training__text { grid-area: text; align-self: center; }
.training__text h2 { font-size: var(--text-display-s); }
.training__text p { margin-top: var(--space-lg); color: var(--color-ink-2); }
.training__text .btn { margin-top: var(--space-xl); }

.steps { grid-area: steps; list-style: none; padding: var(--space-xl) 0 0; display: grid; gap: var(--space-xl); }
.steps li { display: grid; gap: var(--space-xs); padding-left: var(--space-lg); border-left: 3px solid var(--color-accent); }
.steps h3 { font-size: var(--text-lg); }
.steps .stage {
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-sm);
  color: var(--color-accent-deep); font-variant-numeric: tabular-nums;
}
.steps p { color: var(--color-muted); font-size: var(--text-base); }

/* ---------- Contact studio ---------- */
.services {
  padding: var(--space-2xl) 0 var(--space-3xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  display: grid; gap: var(--space-md); justify-items: start;
}
.services h2 { font-size: var(--text-xl); }
.services p { color: var(--color-ink-2); }
.services .cta-outline { margin-top: var(--space-sm); }

/* ---------- Footer · Ft5 statement ---------- */
.foot-stmt { padding: var(--space-2xl) 0 var(--space-xl); display: grid; gap: var(--space-xl); }
.foot-stmt__line {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.08;
  letter-spacing: -0.02em; max-width: 24ch;
}
.foot-stmt__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted); font-size: var(--text-sm);
}
.foot-stmt__meta img { height: 22px; width: auto; display: block; }
.foot-stmt__links { display: flex; gap: var(--space-lg); }
.foot-stmt__links a { color: var(--color-ink-2); text-decoration: none; white-space: nowrap; }
.foot-stmt__links a:hover { color: var(--color-accent-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; gap: var(--space-xl); }
  .hero__proof {
    justify-self: stretch;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    border-top: var(--rule-hair) solid var(--color-rule);
    padding-top: var(--space-xl);
  }
  .training { grid-template-columns: 1fr; grid-template-areas: "flow" "text" "steps"; gap: var(--space-xl); }
}

@media (max-width: 40rem) {
  .nav { gap: var(--space-md); }
  .nav__links { display: none; }
  .hero { padding-block: var(--space-lg) var(--space-2xl); }
  .head-hang { padding-block: var(--space-2xl) var(--space-lg); }
  /* sous 640 px le texte du diagramme devient illisible ; les étapes 1–3 portent la même info */
  .flow { display: none; }
  .training { grid-template-areas: "text" "steps"; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .reveal { animation: reveal-reduced 150ms linear both; }
  @keyframes reveal-reduced { from { opacity: 0; } }
  .u-draw path { animation: none; stroke-dashoffset: 0; }
  .flow__arrow--live { animation: none; stroke-dasharray: none; }
}
