/* =========================================================
   dda.marketing - design system & global styles
   ========================================================= */

/* -----------------------------------------------------------
   1. RESET & BASE
   ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .scroll-cue span::after,
  .hero-line { animation: none !important; opacity: 1 !important; transform: none !important; }
}

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--color-ink);
  background-color: var(--color-cream);
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background-color: var(--color-clay); color: var(--color-cream); }

/* Focus visible globally - WCAG 2.4.7, 2.4.13 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-clay);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--color-deep);
  color: var(--color-cream);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  transition: top 200ms var(--ease-out-quart);
}
.skip-link:focus,
.skip-link:focus-visible { top: 8px; }

/* sup styling - discrete & coherent */
sup { font-size: 0.6em; vertical-align: super; line-height: 0; }

/* -----------------------------------------------------------
   2. DESIGN TOKENS
   ----------------------------------------------------------- */
:root {
  /* Palette */
  --color-clay: #a9522c;
  --color-clay-dark: #8e4324;
  --color-sand: #e6ccb2;
  --color-cream: #ede0d4;
  --color-slate: #263c41;
  --color-deep: #143642;
  --color-ink: #101315;

  /* Aliases - opacités réhaussées pour WCAG 1.4.3 (4.5:1) sur fond cream */
  --color-text-muted: rgba(16, 19, 21, 0.72);
  --color-text-soft: rgba(16, 19, 21, 0.78);
  --color-text-faint: rgba(16, 19, 21, 0.76);
  --color-line: rgba(20, 54, 66, 0.62);
  --color-line-soft: rgba(20, 54, 66, 0.14);
  --color-line-on-deep: rgba(237, 224, 212, 0.22);

  /* Typography */
  --ff-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-body: 1rem;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -----------------------------------------------------------
   3. PAGE BACKGROUND (radial gradients fixed)
   ----------------------------------------------------------- */
.page {
  position: relative;
  min-height: 100vh;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 0%, rgba(169, 82, 44, 0.16), transparent 22%),
    radial-gradient(circle at 86% 42%, rgba(20, 54, 66, 0.14), transparent 30%),
    linear-gradient(120deg, rgba(237, 224, 212, 1) 0%, rgba(230, 204, 178, 0.52) 100%);
}

main, .site-header, .nav-overlay, .page-veil { position: relative; z-index: 1; }

/* -----------------------------------------------------------
   4. HEADER (fixe, glass)
   ----------------------------------------------------------- */
.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(237, 224, 212, 0.64);
  border-bottom: 1px solid var(--color-line-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  color: var(--color-clay);
  text-decoration: none;
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 740;
  letter-spacing: -0.045em;
  text-transform: lowercase;
  gap: 0;
}

/* .brand__slash retiré : le brand affiche désormais "dda" seul */

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav-links a {
  color: var(--color-text-muted);
  transition: color 220ms var(--ease-out-quart);
  padding: 14px 4px;
  display: inline-flex;
  align-items: center;
  margin: -14px 0;
}

.nav-links a:hover, .nav-links a.is-active { color: var(--color-clay); }

.menu-button {
  width: 34px;
  height: 28px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  border: 0;
  padding: 8px;
  box-sizing: content-box;
  background: transparent;
  cursor: pointer;
  margin: -8px;
}

.menu-button span {
  display: block;
  height: 2px;
  background: var(--color-clay);
  transition: transform 350ms var(--ease-out-quart), opacity 250ms;
}

.menu-button.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-button.is-open span:nth-child(2) { opacity: 0; }
.menu-button.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 76px 0 0 0;
  background: rgba(237, 224, 212, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 19;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms var(--ease-out-quart);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 36px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.nav-overlay.is-open { opacity: 1; pointer-events: auto; }

.nav-overlay__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav-overlay__list a {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 14px;
  text-transform: lowercase;
}

.nav-overlay__list a:hover { color: var(--color-clay); }

.nav-overlay__list a::before {
  content: "/";
  color: var(--color-clay);
  font-weight: 600;
}

.nav-overlay__footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--color-line);
  font-size: 14px;
  color: var(--color-text-muted);
  display: grid;
  gap: 6px;
}

.nav-overlay__footer a { color: var(--color-ink); }

/* -----------------------------------------------------------
   5. HERO
   ----------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  padding: 112px 48px 46px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 1px solid var(--color-line-soft);
}

.hero-note {
  position: absolute;
  top: 132px;
  left: 48px;
  max-width: 50vw;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(16, 19, 21, 0.78);
  opacity: 0;
  transform: translateY(10px);
  animation: enter 0.7s ease 0.2s forwards;
}

.hero-line {
  display: flex;
  align-items: baseline;
  gap: 0.02em;
  max-width: calc(100vw - 96px);
  white-space: nowrap;
  font-weight: 820;
  letter-spacing: -0.078em;
  line-height: 0.88;
  font-size: clamp(32px, 4.6vw, 76px);
  opacity: 0;
  transform: translateY(28px);
  animation: enter 0.85s var(--ease-out-quart) 0.08s forwards;
}

.hero-root { color: var(--color-ink); }

.hero-scrollbox {
  position: relative;
  display: inline-block;
  height: 1.04em;
  max-width: 78vw;
  overflow: hidden;
  color: var(--color-clay);
  padding-right: 0.12em;
  pointer-events: none;
  /* mask pour fader proprement le débordement éventuel */
  mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}

.hero-word {
  height: 1.04em;
  display: flex;
  align-items: baseline;
}

.hero-word:first-child { animation: softPulse 1.1s ease 0.9s both; }

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  color: var(--color-text-faint);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  animation: enter 0.7s ease 0.55s forwards;
}

.scroll-cue span {
  width: 54px;
  height: 1px;
  background: rgba(16, 19, 21, 0.26);
  position: relative;
  overflow: hidden;
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 38px;
  height: 1px;
  background: var(--color-clay);
  animation: lineMove 2.2s ease-in-out infinite;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-top: 48px;
}

.hero-sub {
  max-width: 660px;
  font-size: clamp(15px, 1.4vw, 21px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-slate);
}

.hero-meta {
  display: flex;
  gap: 22px;
  color: rgba(16, 19, 21, 0.74);
  font-size: 14px;
  white-space: nowrap;
}

/* -----------------------------------------------------------
   6. WRAP & SECTIONS
   ----------------------------------------------------------- */
.wrap {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 96px));
  margin: 0 auto;
}

.section {
  position: relative;
  z-index: 1;
  padding: 124px 0;
}

.section-tight { padding: 96px 0; }

.kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 46px;
  color: var(--color-clay);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.kicker > span:first-child {
  width: 52px;
  height: 1px;
  background: var(--color-clay);
  display: inline-block;
  flex: none;
}

.kicker-light { color: var(--color-cream); }
.kicker-light > span:first-child { background: var(--color-cream); }

h1, h2, h3, p { margin: 0; }

.section-head {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 76px;
  align-items: start;
  margin-bottom: 42px;
}

.section-title {
  font-size: clamp(32px, 3.6vw, 60px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 800;
  text-transform: lowercase;
}

.section-copy {
  max-width: 610px;
  font-size: clamp(18px, 1.7vw, 26px);
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--color-text-soft);
}

/* -----------------------------------------------------------
   7. LINE LIST (Montone-style)
   ----------------------------------------------------------- */
.line-list {
  border-top: 1px solid var(--color-line);
}

.line-item {
  display: grid;
  grid-template-columns: 110px 1fr 1.05fr;
  gap: 30px;
  align-items: baseline;
  padding: 31px 0;
  border-bottom: 1px solid var(--color-line);
  transition: padding-left 280ms var(--ease-out-quart);
}

.line-item:hover { padding-left: 18px; }

a.line-item, a.line-item--link {
  text-decoration: none;
  color: inherit;
  position: relative;
}

a.line-item:hover .line-title,
a.line-item--link:hover .line-title { color: var(--color-clay); }
a.line-item:hover { cursor: pointer; }
a.line-item::after,
a.line-item--link::after {
  content: "↗";
  position: absolute;
  right: 6px;
  top: 31px;
  color: var(--color-clay);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 280ms, transform 280ms;
  font-weight: 700;
}
a.line-item:hover::after,
a.line-item--link:hover::after { opacity: 1; transform: translateX(0); }

.line-num {
  color: var(--color-clay);
  font-size: 13px;
  letter-spacing: 0.2em;
  font-family: var(--ff-mono);
}

.line-title {
  font-size: clamp(26px, 2.8vw, 48px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 790;
  text-transform: lowercase;
}

.line-copy {
  font-size: 17px;
  line-height: 1.42;
  color: rgba(16, 19, 21, 0.76);
}

/* -----------------------------------------------------------
   8. DARK SECTION
   ----------------------------------------------------------- */
.dark-section {
  background: var(--color-deep);
  color: var(--color-cream);
  border-radius: 42px 42px 0 0;
  padding: clamp(86px, 9vw, 110px) 0;
}

.dark-section .section-title { color: var(--color-cream); }
.dark-section .section-copy,
.dark-section .line-copy { color: rgba(237, 224, 212, 0.72); }
.dark-section .line-title { color: var(--color-cream); }
.dark-section .line-list,
.dark-section .line-item { border-color: var(--color-line-on-deep); }

/* -----------------------------------------------------------
   9. TECH GRID (logos)
   ----------------------------------------------------------- */
.tech-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
}

.tech-logo {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(237, 224, 212, 0.76);
  color: var(--color-deep);
  font-size: clamp(26px, 3vw, 48px);
  font-weight: 800;
  letter-spacing: -0.06em;
  transition: background 250ms var(--ease-out-quart),
              color 250ms var(--ease-out-quart);
  text-transform: none;
}

.tech-logo:hover {
  background: var(--color-deep);
  color: var(--color-cream);
}

/* -----------------------------------------------------------
   10. ABOUT
   ----------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 76px;
  align-items: end;
}

.about-text {
  font-size: clamp(26px, 3.0vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 760;
  color: var(--color-ink);
  text-transform: lowercase;
}

.about-small {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.48;
  color: rgba(16, 19, 21, 0.64);
  margin-bottom: 36px;
}

/* -----------------------------------------------------------
   11. TEXT LINK (CTA inline)
   ----------------------------------------------------------- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.015em;
  border-bottom: 1px solid rgba(16, 19, 21, 0.5);
  padding: 6px 0 6px;
  min-height: 36px;
  transition: border-color 220ms var(--ease-out-quart);
}

.text-link span { transition: transform 220ms var(--ease-out-quart); }
.text-link:hover span { transform: translate(3px, -3px); }
.text-link:hover { border-color: var(--color-clay); color: var(--color-clay); }

.text-link-light { color: white; border-color: rgba(255, 255, 255, 0.75); }
.text-link-light:hover { color: white; border-color: white; }

/* -----------------------------------------------------------
   12. CONTACT SECTION (clay)
   ----------------------------------------------------------- */
.contact-section {
  background: var(--color-clay);
  color: white;
  padding: 106px 0 54px;
  border-radius: 42px 42px 0 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 74px;
  align-items: end;
}

.contact-title {
  font-size: clamp(34px, 4.0vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 800;
  max-width: 880px;
  text-transform: lowercase;
}

.contact-title--short {
  font-size: clamp(32px, 3.4vw, 56px);
  max-width: 520px;
}

.contact-card {
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  padding-top: 30px;
  display: grid;
  gap: 26px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.45;
}

.contact-card strong {
  color: white;
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}

.contact-card a {
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  transition: border-color 220ms var(--ease-out-quart);
  display: inline-block;
  padding: 6px 0;
  margin: 2px 0;
  min-height: 24px;
}

.contact-card a:hover { border-color: white; }

/* -----------------------------------------------------------
   13. FOOTER
   ----------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 26px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  margin-top: 120px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.40);
  flex-wrap: wrap;
}

.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__legal a {
  transition: color 220ms;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.footer__legal a:hover { color: white; }

/* -----------------------------------------------------------
   14. SUB-PAGE (services, à propos, contact, légal)
   ----------------------------------------------------------- */
.subpage {
  padding-top: 76px;
}

.subpage-hero {
  padding: 96px 0 62px;
}

.subpage-hero .breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.subpage-hero .breadcrumb .sep { color: var(--color-clay); }
.subpage-hero .breadcrumb a:hover { color: var(--color-clay); }

.subpage-hero h1 {
  font-size: clamp(36px, 4.6vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  font-weight: 820;
  text-transform: lowercase;
}

.subpage-hero p {
  margin-top: 24px;
  max-width: 640px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--color-text-soft);
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.team-card { display: flex; flex-direction: column; gap: 14px; }

.team-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--color-sand);
}

.team-card__photo img,
.team-card__photo svg {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease-out-expo);
}

.team-card:hover .team-card__photo img,
.team-card:hover .team-card__photo svg { transform: scale(1.04); }

.team-card__name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.team-card__role {
  font-size: 14px;
  color: var(--color-text-muted);
}

.team-card__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  margin-top: 4px;
}

/* Form */
.form { display: grid; gap: 18px; max-width: 520px; }

.field { display: grid; gap: 6px; }

.field__label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field__input,
.field__textarea {
  border: none;
  border-bottom: 1px solid rgba(20, 54, 66, 0.7);
  background: transparent;
  padding: 12px 0;
  font-size: 16px;
  color: var(--color-ink);
  transition: border-color 220ms var(--ease-out-quart);
  border-radius: 0;
  font-family: inherit;
}

.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-bottom-color: var(--color-clay);
}

.field__textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
@media (max-width: 680px) {
  .field__textarea { min-height: 140px; }
}

.btn-submit {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 14px 22px;
  background: var(--color-ink);
  color: var(--color-cream);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 220ms var(--ease-out-quart);
}

.btn-submit:hover { background: var(--color-clay); }
.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.form__note {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Prose (légal pages) */
.prose { max-width: 720px; display: grid; gap: 22px; }
.prose h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.04em;
  font-weight: 760;
  margin-top: 16px;
  text-transform: lowercase;
}
.prose p { font-size: 17px; line-height: 1.65; color: var(--color-text-soft); }
.prose ul {
  display: grid; gap: 10px; padding-left: 0; list-style: none;
}
.prose ul li {
  position: relative; padding-left: 22px;
  font-size: 17px; line-height: 1.5; color: var(--color-text-soft);
}
.prose ul li::before {
  content: "/"; position: absolute; left: 0; top: 0;
  color: var(--color-clay); font-weight: 600;
}
.prose strong { color: var(--color-ink); font-weight: 700; }
.prose a { border-bottom: 1px solid currentColor; }

/* -----------------------------------------------------------
   15. PAGE VEIL (entrée)
   Sécurisé sans-JS : auto-hide via animation CSS pure.
   Si JS s'exécute, il ajoute .is-out et accélère la sortie.
   ----------------------------------------------------------- */
.page-veil {
  position: fixed;
  inset: 0;
  background: var(--color-deep);
  z-index: 100;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 850ms cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: veilAutoHide 0.001s linear 1.6s forwards;
}

@keyframes veilAutoHide {
  to { transform: translateY(-100%); visibility: hidden; }
}

.page-veil.is-out {
  transform: translateY(-100%);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .page-veil { display: none !important; }
}

.page-veil__brand {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 820;
  letter-spacing: -0.07em;
  color: var(--color-cream);
  text-transform: lowercase;
  display: inline-flex;
  align-items: baseline;
}

/* page-veil affiche "dda.marketing" en un seul span */

/* -----------------------------------------------------------
   16. ANIMATIONS
   ----------------------------------------------------------- */
@keyframes enter { to { opacity: 1; transform: translateY(0); } }

@keyframes softPulse {
  0% { opacity: 0.35; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes lineMove {
  0%, 100% { transform: translateX(-18px); opacity: 0.4; }
  50% { transform: translateX(8px); opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out-expo),
              transform 800ms var(--ease-out-expo);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* -----------------------------------------------------------
   17. ACCESSIBILITY
   ----------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

section[id], main[id] { scroll-margin-top: 96px; }
@media (max-width: 680px) {
  section[id], main[id] { scroll-margin-top: 84px; }
}

/* -----------------------------------------------------------
   18. RESPONSIVE
   ----------------------------------------------------------- */
@media (max-width: 1060px) {
  .site-header { padding: 0 28px; }
  .nav-links { display: none; }
  .menu-button { display: flex; }
  .hero { padding: 104px 28px 36px; }
  .hero-note { left: 28px; top: 116px; }
  .hero-line {
    max-width: calc(100vw - 56px);
    font-size: clamp(46px, 10.4vw, 96px);
  }
  .hero-scrollbox { max-width: 72vw; }
  .hero-bottom, .section-head, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-meta { flex-wrap: wrap; }
  .wrap { width: min(100% - 56px, 1320px); }
  .line-item { grid-template-columns: 74px 1fr; }
  .line-copy { grid-column: 2; }
  .tech-row { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .site-header { height: 68px; padding: 0 18px; }
  .nav-overlay { inset: 68px 0 0 0; padding: 24px 18px; }
  .nav-overlay__list { gap: 12px; }
  .nav-overlay__list a { font-size: 22px; padding: 6px 0; }
  .hero { min-height: 92vh; min-height: 92svh; padding: 92px 18px 26px; }
  .hero-note { position: static; margin-bottom: 100px; max-width: 330px; }
  .hero-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    white-space: nowrap;
    font-size: clamp(34px, 10vw, 52px);
  }
  .hero-scrollbox {
    display: block;
    max-width: 100%;
    height: 1.04em;
    white-space: nowrap;
    /* Mask désactivé mobile : le texte est sur sa propre ligne et ne déborde pas en horizontal */
    mask-image: none;
    -webkit-mask-image: none;
    /* Réduire taille du rotateur uniquement, pour caser "intelligence marketing" */
    font-size: 0.78em;
  }
  .hero-word { height: 1.04em; white-space: nowrap; }
  .scroll-cue { margin-top: 18px; }
  .hero-bottom { margin-top: 34px; }
  .hero-meta { font-size: 13px; gap: 12px; }
  .wrap { width: min(100% - 36px, 1320px); }
  .section { padding: 78px 0; }
  .section-tight { padding: 64px 0; }
  .kicker { margin-bottom: 28px; }
  .section-head { gap: 22px; margin-bottom: 28px; }
  .line-item { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .line-copy { grid-column: auto; }
  .tech-row { grid-template-columns: 1fr; }
  .tech-logo { min-height: 124px; }
  .contact-section { padding: 72px 0 32px; border-radius: 32px 32px 0 0; }
  .dark-section { border-radius: 32px 32px 0 0; padding: clamp(56px, 14vw, 70px) 0; }
  .brand { font-size: 18px; }
  .footer { flex-direction: column; margin-top: 64px; }
  .team-grid { grid-template-columns: 1fr; }
  .subpage { padding-top: 68px; }
  .subpage-hero { padding: 72px 0 48px; }
  .subpage-hero h1 { font-size: clamp(36px, 11vw, 64px); }
  .contact-grid, .contact-card { gap: 18px; }
}

/* ========================================================================
   Anime.js enhancements — états initiaux appliqués UNIQUEMENT si JS+anime
   sont prêts ET prefers-reduced-motion est OFF.
   En cas d'échec de chargement → aucune classe ajoutée → tout reste visible.
   ======================================================================== */
.anime-ready .hero-anim-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  will-change: transform, opacity;
}
.anime-ready .section-title.is-anime-ready {
  clip-path: inset(0 0 100% 0);
  -webkit-clip-path: inset(0 0 100% 0);
}
.anime-ready .line-item.is-anime-ready .line-num,
.anime-ready .line-item.is-anime-ready .line-title,
.anime-ready .line-item.is-anime-ready .line-copy {
  opacity: 0;
  will-change: transform, opacity;
}
.anime-ready .line-item.is-anime-ready .line-num { transform: translateX(-12px); }
.anime-ready .line-item.is-anime-ready .line-title { transform: translateY(14px); }
.anime-ready .line-item.is-anime-ready .line-copy  { transform: translateY(8px); }
.anime-ready .tech-logo.is-anime-ready {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  will-change: transform, opacity;
}

/* ========================================================================
   Scroll-snap par section — homepage desktop uniquement.
   - Activé seulement sur device avec souris fine (pas de touch mobile).
   - Désactivé si prefers-reduced-motion.
   - Sections plus longues que le viewport restent lisibles (snap normal).
   ======================================================================== */
@media (hover: hover) and (pointer: fine) {
  html:has(body.is-home) { scroll-snap-type: y mandatory; }
  body.is-home .hero,
  body.is-home #expertises,
  body.is-home #approche,
  body.is-home .section-tight,
  body.is-home #apropos,
  body.is-home #contact {
    scroll-snap-align: start;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.is-home) { scroll-snap-type: none !important; }
}

/* ========================================================================
   Creature ambiante — fixed full-viewport, visible sur toute la home.
   Adapté du pen Julian Garnier (taille originale 0.2vh restaurée).
   ======================================================================== */
.creature-stage {
  position: fixed;
  inset: 0;
  /* z-index 15 : au-dessus de main (z:1) et nav-overlay (z:19 mais hidden),
     en-dessous du header fixe (z:20). pointer-events:none → clics passent. */
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.38;
}
.creature-stage #creature-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.creature-stage #creature {
  /* 130em × 0.18vh ≈ 23.4vh de grille */
  font-size: 0.18vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150em;
  height: 150em;
  flex-wrap: wrap;
}
.creature-stage #creature div {
  transform-style: preserve-3d;
  position: relative;
  width: 4em;
  height: 4em;
  margin: 3em;
  border-radius: 2em;
  will-change: transform;
  mix-blend-mode: plus-lighter;
  background: var(--color-clay);
}
@media (prefers-reduced-motion: reduce) {
  .creature-stage { display: none; }
}
