/* ==========================================================================
   Julien Fouriot — site personnel
   Thème sombre par défaut, thème clair disponible. Aucune dépendance.
   ========================================================================== */

:root {
  --bg:            #070809;
  --bg-elev:       #0D0F13;
  --bg-elev-2:     #14171D;
  --line:          rgba(255,255,255,.08);
  --line-strong:   rgba(255,255,255,.17);
  --text:          #EDEEF1;
  --text-muted:    #9AA1AC;
  --text-dim:      #676E79;
  --accent:        #7FB2FF;
  --accent-2:      #5EEAD4;
  --accent-soft:   rgba(127,178,255,.13);
  --glow:          rgba(127,178,255,.10);
  --iris: linear-gradient(100deg, #5EEAD4 0%, #7FB2FF 32%, #C4B5FD 64%, #FDE68A 100%);

  --font-display: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --radius: 16px;
  --section-gap: clamp(4.5rem, 10vw, 9.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="light"] {
  --bg:            #FBFAF8;
  --bg-elev:       #FFFFFF;
  --bg-elev-2:     #F3F2EE;
  --line:          rgba(10,12,16,.10);
  --line-strong:   rgba(10,12,16,.22);
  --text:          #101215;
  --text-muted:    #545A63;
  --text-dim:      #7B818B;
  --accent:        #1D4ED8;
  --accent-2:      #0D9488;
  --accent-soft:   rgba(29,78,216,.08);
  --glow:          rgba(29,78,216,.07);
  --iris: linear-gradient(100deg, #0D9488 0%, #1D4ED8 32%, #7C3AED 64%, #B45309 100%);
}

/* --------------------------------------------------------------- base --- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }

/* ------------------------------------------------- grain + progression --- */

.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
:root[data-theme="light"] .grain { opacity: .022; mix-blend-mode: multiply; }

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 120; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0;
  background: var(--iris);
  transform-origin: 0 50%;
  transition: width .08s linear;
}

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease), background .35s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }

.brand {
  font-family: var(--font-mono);
  font-size: .76rem; letter-spacing: .13em; text-transform: uppercase;
  text-decoration: none; color: var(--text); white-space: nowrap;
}
.brand .brand-sep { color: var(--accent); margin-inline: .45rem; }
.brand .brand-role { color: var(--text-dim); }

.nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.nav a.nav-link {
  position: relative;
  font-size: .84rem; color: var(--text-muted); text-decoration: none;
  padding: .5rem .8rem; border-radius: 999px;
  transition: color .2s var(--ease);
}
.nav a.nav-link::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}
.nav a.nav-link:hover { color: var(--text); }
.nav a.nav-link:hover::after { transform: scaleX(1); }

.switches { display: flex; align-items: center; gap: .4rem; margin-left: .5rem; }
.switch {
  font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .72rem; cursor: pointer; text-decoration: none; line-height: 1;
  display: inline-flex; align-items: center; gap: .35rem;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.switch:hover { color: var(--text); border-color: var(--line-strong); background: var(--bg-elev-2); transform: translateY(-1px); }

@media (max-width: 900px) { .nav a.nav-link { display: none; } }

/* --------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  padding-top: clamp(3rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  isolation: isolate;
}

.aurora {
  position: absolute; inset: -20% 0 auto 0; height: 130%;
  z-index: -1; pointer-events: none; overflow: hidden;
  filter: blur(70px); opacity: .55;
}
.aurora span {
  position: absolute; display: block; border-radius: 50%;
  will-change: transform;
}
.aurora span:nth-child(1) {
  width: 46vw; height: 46vw; left: -6vw; top: -8vw;
  background: radial-gradient(circle, rgba(127,178,255,.55), transparent 65%);
  animation: drift-a 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(2) {
  width: 38vw; height: 38vw; left: 34vw; top: 6vw;
  background: radial-gradient(circle, rgba(94,234,212,.34), transparent 65%);
  animation: drift-b 32s var(--ease) infinite alternate;
}
.aurora span:nth-child(3) {
  width: 32vw; height: 32vw; right: -4vw; top: -4vw;
  background: radial-gradient(circle, rgba(196,181,253,.38), transparent 65%);
  animation: drift-c 24s var(--ease) infinite alternate;
}
:root[data-theme="light"] .aurora { opacity: .42; }

@keyframes drift-a { to { transform: translate3d(9vw, 5vw, 0) scale(1.14); } }
@keyframes drift-b { to { transform: translate3d(-7vw, 8vw, 0) scale(.88); } }
@keyframes drift-c { to { transform: translate3d(-6vw, 6vw, 0) scale(1.18); } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.6rem;
  display: flex; align-items: center; gap: .8rem;
}
.eyebrow::after {
  content: ""; height: 1px; flex: 1; max-width: 9rem;
  background: var(--iris); opacity: .8;
}

.portrait {
  width: clamp(104px, 13vw, 150px);
  height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  margin: 0 0 1.6rem;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.portrait:hover { transform: translateY(-4px) rotate(-1.2deg); box-shadow: 0 26px 60px rgba(0,0,0,.6); }
:root[data-theme="light"] .portrait { box-shadow: 0 16px 38px rgba(10,12,16,.16); }
:root[data-theme="light"] .portrait:hover { box-shadow: 0 22px 46px rgba(10,12,16,.2); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 11.5vw, 8rem);
  line-height: .86;
  letter-spacing: -.045em;
  margin: 0 0 1.7rem;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: block;
  background: linear-gradient(92deg, var(--text) 0%, var(--text) 38%, var(--accent) 52%, var(--text) 66%, var(--text) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: rise 1s var(--ease) backwards, sheen 7s var(--ease) 1.6s infinite;
}
.hero h1 .line:nth-child(1) > span { animation-delay: .05s, 1.6s; }
.hero h1 .line:nth-child(2) > span { animation-delay: .16s, 2s; }

@keyframes rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes sheen {
  0%, 55% { background-position: 130% 0; }
  85%, 100% { background-position: -30% 0; }
}

.hero .lead {
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  line-height: 1.42; letter-spacing: -.015em;
  color: var(--text); max-width: 36ch; margin: 0 0 1.1rem;
  text-wrap: balance;
}
.hero .sub { color: var(--text-muted); max-width: 58ch; margin: 0 0 2.5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

.facts { border-top: 1px solid var(--line); margin-top: .35rem; }
.fact {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem;
  padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .9rem;
  transition: padding-left .3s var(--ease);
}
.fact:hover { padding-left: .5rem; }
.fact dt {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); padding-top: .25rem;
}
.fact dd { margin: 0; color: var(--text-muted); }
@media (max-width: 520px) { .fact { grid-template-columns: 1fr; gap: .15rem; } }

/* ------------------------------------------------------------ boutons --- */

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
  text-decoration: none; padding: .82rem 1.4rem;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease),
              border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(2px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent); color: #04060A;
  box-shadow: 0 12px 30px var(--glow);
}
:root[data-theme="light"] .btn-primary:hover { color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover {
  transform: translateY(-2px); background: var(--bg-elev-2);
  border-color: var(--text-dim); box-shadow: 0 12px 26px rgba(0,0,0,.25);
}

/* ------------------------------------------------------------ marquee --- */

.marquee {
  position: relative;
  border-block: 1px solid var(--line);
  padding-block: 1.1rem;
  overflow: hidden;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
  display: flex; width: max-content;
  animation: slide 46s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim); white-space: nowrap; padding-inline: 1.5rem;
  display: inline-flex; align-items: center; gap: 1.4rem;
}
.marquee-track span::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); opacity: .55;
}
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }

/* ------------------------------------------------------------ section --- */

.section { padding-block: var(--section-gap); position: relative; }
.section + .section { padding-top: 0; }

.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.02; letter-spacing: -.035em;
  margin: 0 0 .8rem; text-wrap: balance;
}
.section-head p { color: var(--text-muted); max-width: 64ch; margin: 0; }

.rule-iris { height: 2px; background: var(--iris); border: 0; opacity: .9; }

/* -------------------------------------------------------------- cartes --- */
/* Halo qui suit le curseur : --mx / --my sont posés par app.js */

.spot { position: relative; isolation: isolate; }
.spot > * { position: relative; z-index: 1; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  opacity: 0; transition: opacity .45s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 68%);
}
.spot:hover::before { opacity: 1; }

/* -------------------------------------------------------------- stats --- */

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat {
  background: var(--bg); padding: 1.9rem 1.6rem 1.6rem;
  transition: background .35s var(--ease);
}
.stat:hover { background: var(--bg-elev); }
.stat .num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 3.4rem);
  line-height: 1; letter-spacing: -.04em;
  margin: 0 0 .6rem;
  background: var(--iris);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  width: fit-content;
  font-variant-numeric: tabular-nums;
}
.stat .label { font-size: .91rem; color: var(--text-muted); margin: 0; }
.stat .note {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-dim); margin: .7rem 0 0;
}

/* ----------------------------------------------------------- timeline --- */

.timeline { border-top: 1px solid var(--line); position: relative; }

.job {
  display: grid; grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.9rem, 3.5vw, 2.8rem) clamp(0rem, 1vw, 1rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .4s var(--ease);
}
.job:hover { background: var(--bg-elev); }
.job::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0;
  background: var(--iris);
  transition: width .7s var(--ease);
}
.job:hover::after { width: 100%; }

.job-when {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
  color: var(--accent); display: block; margin-bottom: .45rem;
}
.job-where { font-size: .79rem; color: var(--text-dim); display: block; }
.job h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.3rem; letter-spacing: -.02em; margin: 0 0 .2rem; line-height: 1.24;
}
.job .company { font-size: .94rem; color: var(--text-muted); margin: 0 0 1rem; }
.job ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.job li { position: relative; padding-left: 1.15rem; color: var(--text-muted); font-size: .94rem; }
.job li::before {
  content: ""; position: absolute; left: 0; top: .66em;
  width: 6px; height: 1px; background: var(--text-dim);
  transition: width .3s var(--ease), background .3s var(--ease);
}
.job:hover li::before { width: 10px; background: var(--accent); }
.job li strong { color: var(--text); font-weight: 600; }

@media (max-width: 760px) {
  .job { grid-template-columns: 1fr; gap: .8rem; }
  .job-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
  .job-when { margin-bottom: 0; }
}

/* ------------------------------------------------------------ piliers --- */

.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.pillar {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.9rem 1.7rem; background: var(--bg-elev);
  transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pillar:hover {
  border-color: var(--line-strong); transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}
:root[data-theme="light"] .pillar:hover { box-shadow: 0 18px 40px rgba(10,12,16,.1); }
.pillar .idx {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em;
  color: var(--accent); display: block; margin-bottom: 1.1rem;
}
.pillar h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.2rem; margin: 0 0 .7rem; letter-spacing: -.025em;
}
.pillar p { margin: 0; color: var(--text-muted); font-size: .94rem; }

/* ----------------------------------------------------------------- ia --- */

.ia-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); overflow: hidden;
}
.ia-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ia-cell {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.ia-cell:hover { background: var(--bg-elev-2); }
.ia-cell:nth-child(2n) { border-right: 0; }
.ia-cell:nth-last-child(-n+2) { border-bottom: 0; }
.ia-cell h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.08rem; letter-spacing: -.02em; margin: 0 0 .8rem;
  display: flex; align-items: flex-start; gap: .65rem; line-height: 1.32;
}
.ia-cell h3 .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none; margin-top: .45em; align-self: flex-start;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 3.4s ease-out infinite;
}
.ia-cell:nth-child(2) h3 .dot { animation-delay: .85s; }
.ia-cell:nth-child(3) h3 .dot { animation-delay: 1.7s; }
.ia-cell:nth-child(4) h3 .dot { animation-delay: 2.55s; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}
.ia-cell p { margin: 0; color: var(--text-muted); font-size: .93rem; }
.ia-cell p + p { margin-top: .7rem; }

.ia-foot { padding: clamp(1.5rem, 3vw, 2.4rem); display: grid; gap: 1rem; }
.ia-foot p { margin: 0; color: var(--text-muted); font-size: .93rem; max-width: 72ch; }
.ia-foot .caveat {
  border-left: 2px solid var(--line-strong); padding-left: 1.1rem;
  color: var(--text-dim); font-size: .9rem;
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.chip {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .36rem .8rem; background: var(--bg);
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

/* ------------------------------------------------------------ cherche --- */

.looking {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.looking > div { background: var(--bg); padding: 1.7rem 1.6rem; transition: background .35s var(--ease); }
.looking > div:hover { background: var(--bg-elev); }
.looking h3 {
  font-family: var(--font-mono); font-size: .67rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim); margin: 0 0 .9rem; font-weight: 400;
}
.looking p, .looking ul { margin: 0; color: var(--text); font-size: .94rem; }
.looking ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
.looking li::before { content: "— "; color: var(--accent); }

/* ------------------------------------------------------------- listes --- */

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: .94rem;
  transition: padding-left .3s var(--ease);
}
.mini-list li:hover { padding-left: .5rem; }
.mini-list li:first-child { border-top: 1px solid var(--line); }
.mini-list .k { display: block; color: var(--text); }
.mini-list .v { display: block; color: var(--text-muted); font-size: .85rem; }

/* --------------------------------------------------------------- form --- */

.contact-grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
  transition: color .25s var(--ease);
}
.field:focus-within label { color: var(--accent); }
.field input, .field textarea {
  font-family: var(--font-sans); font-size: .95rem; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 12px; padding: .85rem .95rem; width: 100%;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--bg-elev-2);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: .79rem; color: var(--text-dim); margin: 0; }

.form-status {
  font-size: .9rem; border-radius: 12px; padding: .9rem 1.05rem;
  border: 1px solid var(--line); display: none;
}
.form-status.show { display: block; animation: rise-in .45s var(--ease); }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } }
.form-status.ok { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); color: var(--text); }
.form-status.err { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.08); color: var(--text); }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3.5rem; margin-top: var(--section-gap);
}
.site-footer .bar {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-dim);
}
.site-footer a { color: var(--text-muted); text-decoration: none; transition: color .25s var(--ease); }
.site-footer a:hover { color: var(--accent); }
.site-footer .spacer { margin-left: auto; }

/* ------------------------------------------------------- apparitions --- */

.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  transition-delay: var(--d, 0s);
}

.stagger > * { opacity: 0; transform: translateY(20px); }
.stagger.in > * {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.stagger.in > *:nth-child(1) { transition-delay: .04s; }
.stagger.in > *:nth-child(2) { transition-delay: .1s; }
.stagger.in > *:nth-child(3) { transition-delay: .16s; }
.stagger.in > *:nth-child(4) { transition-delay: .22s; }
.stagger.in > *:nth-child(5) { transition-delay: .28s; }
.stagger.in > *:nth-child(6) { transition-delay: .34s; }
.stagger.in > *:nth-child(7) { transition-delay: .4s; }

/* ------------------------------------------------- mouvement réduit --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  .aurora span, .marquee-track, .hero h1 .line > span, .ia-cell h3 .dot { animation: none !important; }
  .hero h1 .line > span { color: var(--text); -webkit-text-fill-color: var(--text); }
  * { transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .stats { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .ia-grid { grid-template-columns: 1fr; }
  .ia-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .ia-cell:last-child { border-bottom: 0; }
}
@media (max-width: 680px) {
  .brand .brand-sep, .brand .brand-role { display: none; }
  .brand { font-size: .72rem; }
  .site-header .bar { gap: .6rem; }
  .aurora { filter: blur(50px); opacity: .45; }
}

/* -------------------------------------------------------------- print --- */

@media print {
  .site-header, .site-footer, .cta-row, #contact, .switches,
  .grain, .aurora, .scroll-progress, .marquee { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.2rem; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  .stat .num, .hero h1 .line > span { color: #000; -webkit-text-fill-color: #000; background: none; }
  .portrait { box-shadow: none; width: 110px; }
  a { text-decoration: none; color: #000; }
}

/* ====================================================== navigation mobile ==
   Sous 900 px les liens de section disparaissaient sans remplacement :
   un bouton menu ouvre un panneau déroulant sous l'en-tête.
   ========================================================================== */

.menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 34px;
  padding: 0; cursor: pointer;
  background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.menu-btn:hover { border-color: var(--line-strong); background: var(--bg-elev-2); }
.menu-btn .bars { display: block; width: 15px; height: 9px; position: relative; }
.menu-btn .bars::before,
.menu-btn .bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { top: 7.5px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 4px; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: .25rem var(--gutter) 1rem;
}
.mobile-nav a {
  display: block;
  padding: .95rem .25rem;
  font-size: 1rem; color: var(--text-muted); text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .2s var(--ease), padding-left .25s var(--ease);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a:hover, .mobile-nav a:focus-visible { color: var(--text); padding-left: .6rem; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .mobile-nav.is-open { display: block; animation: panel-in .3s var(--ease); }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px); }
}

/* --------------------------------------------- confort tactile (doigts) --- */

@media (hover: none) {
  .switch { padding: .55rem .85rem; min-height: 36px; }
  .menu-btn { width: 42px; height: 38px; }
  .btn { padding: .95rem 1.5rem; }
  .mobile-nav a { padding: 1.05rem .25rem; }
  /* Pas d'effet de survol utile sur un écran tactile : on neutralise */
  .pillar:hover, .portrait:hover, .btn:hover { transform: none; }
}

/* ------------------------------------- respiration aux largeurs moyennes --- */

@media (max-width: 860px) and (min-width: 761px) {
  .job { grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 400px) {
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.2rem); }
  .marquee-track span { padding-inline: 1rem; font-size: .7rem; }
  .stat { padding: 1.5rem 1.25rem 1.3rem; }
  .pillar { padding: 1.5rem 1.25rem; }
}

/* ---------------------------------------- écrans très larges et très bas --- */

@media (min-width: 1600px) { :root { --maxw: 1280px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: 2rem; padding-bottom: 2rem; }
  :root { --section-gap: 3.5rem; }
}
