/* ==========================================================================
   Mathieu Callaghan — Portfolio
   Charte issue du CV : Kumbh Sans, navy #10171d / #161f28, bleu #0080ff,
   cartes très arrondies, titres ponctués d'un point bleu.
   Mobile first. Thème clair/sombre automatique + choix manuel.
   ========================================================================== */

@font-face {
  font-family: "Kumbh Sans";
  src: url("../fonts/kumbh-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Kumbh Sans";
  src: url("../fonts/kumbh-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --font: "Kumbh Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --accent: #0080ff;
  --accent-ink: #0063cc;
  --accent-bg: #0071e3;
  --accent-bg-hover: #005fc2;
  --accent-soft: rgba(0, 128, 255, .1);
  --green: #3fc44e;

  --bg: #ffffff;
  --surface: #f6f6f6;
  --surface-2: #ebebeb;
  --surface-3: #ffffff;
  --text: #161f28;
  --muted: #56616c;
  --muted-2: #d5d9de;
  --line: #e5e6e8;
  --line-strong: #c9ced4;
  --pill: #161f28;
  --shadow: 0 1px 2px rgba(16, 23, 29, .04), 0 12px 32px -12px rgba(16, 23, 29, .12);
  --header-bg: rgba(255, 255, 255, .78);

  --r-xl: 32px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --gutter: clamp(16px, 4vw, 32px);
  --gap: clamp(12px, 1.6vw, 20px);
  --maxw: 1240px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-ink: #4da3ff;
    --accent-soft: rgba(0, 128, 255, .14);
    --bg: #10171d;
    --surface: #161f28;
    --surface-2: #1d2833;
    --surface-3: #202b36;
    --text: #f1f1f1;
    --muted: #9ba7b3;
    --muted-2: #364759;
    --line: #222e3a;
    --line-strong: #364759;
    --pill: #0080ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 16px 40px -16px rgba(0, 0, 0, .5);
    --header-bg: rgba(16, 23, 29, .78);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-ink: #4da3ff;
  --accent-soft: rgba(0, 128, 255, .14);
  --bg: #10171d;
  --surface: #161f28;
  --surface-2: #1d2833;
  --surface-3: #202b36;
  --text: #f1f1f1;
  --muted: #9ba7b3;
  --muted-2: #364759;
  --line: #222e3a;
  --line-strong: #364759;
  --pill: #0080ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 16px 40px -16px rgba(0, 0, 0, .5);
  --header-bg: rgba(16, 23, 29, .78);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--accent-bg); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.dot { color: var(--accent); }
.brace { font-weight: 300; color: var(--muted); }

.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Typo ---------- */
.h1, .h2, .h3 { font-weight: 700; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
.h1 { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem); }
.h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
.h3 { font-size: clamp(1.375rem, 1.2rem + .7vw, 1.75rem); margin-bottom: 1rem; }
.ico--title { display: inline-block; vertical-align: -.15em; margin-right: .35rem; color: var(--accent); width: 1.05em; height: 1.05em; }
.lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.3125rem); color: var(--muted); max-width: 46rem; line-height: 1.55; text-wrap: pretty; }
.lead strong { color: var(--text); font-weight: 700; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .75rem; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.eyebrow--light { color: rgba(255, 255, 255, .92); }

/* ---------- Composants ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 32px);
  position: relative;
  transition: background-color .3s var(--ease);
}
.card--accent { background: var(--accent-bg); color: #fff; }

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: 0 1.35rem;
  border: 1.5px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: .9875rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn .ico { width: 1.1em; height: 1.1em; transition: transform .25s var(--ease); }
.btn:hover .ico:last-child { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn--primary { --btn-bg: var(--accent-bg); --btn-fg: #fff; box-shadow: 0 8px 24px -10px rgba(0, 113, 227, .7); }
.btn--primary:hover { --btn-bg: var(--accent-bg-hover); }
.btn--ghost { --btn-bg: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text); }
.btn--light { --btn-bg: #fff; --btn-fg: #161f28; }
.btn--light:hover { --btn-bg: #eef5ff; }
.btn--sm { min-height: 40px; padding: 0 1rem; font-size: .9rem; }
.btn--lg { min-height: 54px; padding: 0 1.6rem; font-size: 1.03rem; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); padding: 0;
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn .ico { width: 20px; height: 20px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center;
  padding: .42em .95em; border: 1.5px solid var(--pill); border-radius: 999px;
  font-size: .8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.pill--sm { padding: .3em .7em; font-size: .72rem; border-width: 1.25px; }
.pills--lg .pill { font-size: .9rem; }
.badge {
  display: inline-flex; align-items: center; padding: .35em .8em; margin-left: .4rem;
  border-radius: 10px; background: var(--text); color: var(--bg);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle;
}

.status { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .95rem .45rem .8rem; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); font-size: .875rem; font-weight: 600; }
.status--plain { background: none; border: 0; padding: 0; }
.status--light { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: #fff; margin-bottom: .75rem; }
.status__dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.status__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--accent-ink); text-decoration: none; }
.link-arrow .ico { transition: transform .25s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 700; letter-spacing: -.02em; flex: none; }
.brand__mark {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: var(--text); color: var(--bg);
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.brand__svg { width: 100%; height: 100%; }
.brand__svg-dot { fill: var(--accent); transition: fill .3s var(--ease); }
.brand:hover .brand__mark { background: var(--accent-bg); color: #fff; transform: rotate(-6deg); }
.brand:hover .brand__svg-dot { fill: #fff; }
.brand__name { font-size: 1.08rem; }
.nav { margin-left: auto; }
.nav__list { display: none; }
.site-header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.site-header__cta { display: none; }

.theme-toggle__icon { display: none; }
:root[data-theme="auto"] .theme-toggle__icon--auto,
:root[data-theme="light"] .theme-toggle__icon--light,
:root[data-theme="dark"] .theme-toggle__icon--dark { display: grid; }

.menu-toggle__bars { position: relative; width: 18px; height: 12px; }
.menu-toggle__bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-toggle__bars span:first-child { top: 1px; }
.menu-toggle__bars span:last-child { top: 9px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:first-child { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:last-child { top: 5px; transform: rotate(-45deg); }

/* Menu mobile plein écran */
@media (max-width: 899.98px) {
  .nav { margin: 0; }
  .nav__list {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    display: flex; flex-direction: column; gap: .25rem;
    padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
    background: var(--bg); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .nav__list.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__link { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-size: clamp(1.75rem, 8vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid var(--line); }
  .nav__link[aria-current="page"] { color: var(--accent-ink); }
  .nav__link[aria-current="page"]::after { content: "."; color: var(--accent); }
  .nav__mobile-extra { margin-top: auto; padding-top: 24px; display: grid; gap: 1rem; }
  .nav__mobile-meta { text-align: center; color: var(--muted); }
  body.menu-open { overflow: hidden; }
  /* backdrop-filter crée un bloc conteneur pour les enfants fixes : on le retire menu ouvert. */
  body.menu-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); border-bottom-color: var(--line); }
  .brand__name { display: none; }
}
@media (min-width: 360px) and (max-width: 899.98px) { .brand__name { display: inline; font-size: 1rem; } }

@media (min-width: 900px) {
  .nav__list { display: flex; gap: .25rem; align-items: center; }
  .nav__link { display: inline-flex; padding: .55rem .9rem; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--muted); transition: color .2s, background-color .2s; }
  .nav__link:hover { color: var(--text); background: var(--surface); }
  .nav__link[aria-current="page"] { color: var(--text); background: var(--surface); }
  .nav__mobile-extra, .menu-toggle { display: none; }
  .site-header__actions { margin-left: .75rem; }
  .site-header__cta { display: inline-flex; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 112px) 0; }
.section--tight { padding-top: clamp(24px, 3vw, 40px); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(24px, 3vw, 40px); }

.page-head { padding-top: clamp(32px, 6vw, 80px); }
.page-head .h1 { margin-bottom: 1.1rem; max-width: 18ch; }
.breadcrumb { margin-bottom: 1.5rem; font-size: .875rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: .4rem; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(16px, 2.4vw, 28px); }
.hero__grid { display: grid; gap: var(--gap); }
/* Une seule carte : mobile en colonne, tablette titre | portrait, desktop texte | panneau portrait. */
.hero__card {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "status" "title" "visual" "quote" "actions";
  align-items: start; justify-items: start;
  gap: clamp(18px, 2.4vw, 28px); padding: clamp(24px, 4.5vw, 56px); border-radius: var(--r-xl);
}
.hero__status { grid-area: status; }
.hero__title { grid-area: title; display: flex; flex-direction: column; gap: .9rem; }
.hero__name { font-size: clamp(2rem, 1.6rem + 6vw, 5rem); font-weight: 700; line-height: .92; letter-spacing: -.045em; }
.hero__seo { font-size: clamp(1.0625rem, 1rem + .45vw, 1.35rem); font-weight: 600; letter-spacing: -.01em; color: var(--muted); text-wrap: balance; }
.hero__visual { grid-area: visual; justify-self: stretch; position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2vw, 22px); }
.hero__visual::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .45;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%);
}
.hero__visual .geek { position: relative; width: min(100%, 440px); }
.hero__role { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .55rem .7rem; text-align: center; font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); font-weight: 500; letter-spacing: -.02em; }
.hero__role-label { white-space: nowrap; }
.hero__role .brace { font-size: 1.4em; line-height: 1; color: var(--accent); font-weight: 300; vertical-align: -.08em; }
.hero__role .badge { margin-left: 0; }
.hero__quote { grid-area: quote; position: relative; padding-left: 1.25rem; border-left: 3px solid var(--accent); max-width: 40rem; }
.hero__quote p { font-size: clamp(1rem, .95rem + .3vw, 1.175rem); line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.hero__quote strong { color: var(--accent-ink); font-weight: 700; }
.hero__actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.stat { display: flex; flex-direction: column; gap: .25rem; padding: clamp(16px, 2.4vw, 28px); border-radius: var(--r-md); }
.stat__value { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.stat__label { font-size: clamp(.78rem, .74rem + .2vw, .95rem); color: var(--muted); line-height: 1.3; }

@media (max-width: 479.98px) {
  .hero__actions { justify-self: stretch; }
  .hero__actions .btn { width: 100%; }
  .badge { margin-left: 0; }
}
@media (min-width: 640px) and (max-width: 959.98px) {
  .hero__card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "status status" "title visual" "quote quote" "actions actions";
  }
  .hero__title { align-self: center; }
  .hero__name { font-size: clamp(2.6rem, .9rem + 5.6vw, 4.2rem); }
}
@media (min-width: 960px) {
  .hero__card {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto auto 1fr;
    grid-template-areas: ". visual" "status visual" "title visual" "quote visual" "actions visual" ". visual";
    column-gap: clamp(28px, 3.6vw, 56px);
  }
  .hero__visual { grid-row: 1 / -1; align-self: stretch; justify-content: center; padding: clamp(20px, 2.4vw, 36px); border-radius: var(--r-lg); background: var(--surface-2); }
  .hero__visual .geek { width: min(100%, 460px); }
}

/* ---------- Illustration ---------- */
.geek { width: 100%; height: auto; overflow: visible; }
.geek .g-disc { fill: var(--accent); }
.geek .g-rings circle { stroke: var(--line-strong); stroke-width: 2; }
.geek .g-win, .geek .g-chip { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1.5; }
.geek .g-code { fill: var(--muted-2); }
.geek .g-code--accent { fill: var(--accent); }
.geek .g-code--green { fill: var(--green); }
.geek .g-chip-txt { font: 700 28px/1 var(--font); fill: var(--text); }
.geek .g-chip-txt--sm { font-size: 22px; }
.geek .g-chip-txt--xs { font: 600 16px/1 var(--mono); }
.geek .g-shirt { fill: #e7e4de; }
.geek .g-collar { stroke: #d3cfc7; }
.geek .g-skin { fill: #f0c4a0; }
.geek .g-skin-dark { fill: #dfa883; }
.geek .g-skin-line { stroke: #c98a66; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.geek .g-cheek { fill: #ec9f86; opacity: .35; }
.geek .g-hair { fill: #2b211d; }
.geek .g-hair-hi { stroke: #4a3a33; stroke-width: 4; stroke-linecap: round; }
.geek .g-hair-side { fill: #5a4840; opacity: .55; }
.geek .g-beard { fill: #3d302b; opacity: .78; }
.geek .g-beard-hi { fill: #2b211d; opacity: .25; }
.geek .g-lip { stroke: #b06a5a; stroke-width: 3; stroke-linecap: round; opacity: .5; }
.geek .g-mouth { fill: #5b1f1f; }
.geek .g-eye { stroke: #2b211d; stroke-width: 5; stroke-linecap: round; }
.geek .g-laptop-lid { fill: #1d2833; }
.geek .g-laptop-edge { stroke: #3a4a5b; stroke-width: 3; }
.geek .g-sticker { fill: #fff; }
.geek .g-sticker-txt { font: 700 24px/1 var(--font); fill: #0080ff; }
.geek .g-led { fill: var(--green); }
.geek .g-mug { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 3; }
.geek .g-mug-handle { stroke: var(--line-strong); stroke-width: 5; }
.geek .g-ai { fill: var(--text); }
.geek .g-ai-star { fill: var(--accent); }
.geek .g-ai-txt { font: 800 24px/1 var(--font); fill: var(--bg); letter-spacing: .02em; }
.geek .g-steam { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .geek .g-float { animation: float 6s ease-in-out infinite; transform-box: fill-box; }
  .geek .g-float--b { animation-delay: -1.5s; animation-duration: 7s; }
  .geek .g-float--c { animation-delay: -3s; animation-duration: 5.5s; }
  .geek .g-float--d { animation-delay: -2s; animation-duration: 6.5s; }
  .geek .g-float--e { animation-delay: -4s; }
  .geek .g-float--f { animation-delay: -2.6s; animation-duration: 5.8s; }
  .geek .g-float--g { animation-delay: -.8s; animation-duration: 7.4s; }
  .geek .g-steam { animation: steam 2.8s ease-in-out infinite; }
  .geek .g-eye { animation: blink 6s infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes steam { 0%, 100% { opacity: .2; transform: translateY(2px); } 50% { opacity: .65; transform: translateY(-3px); } }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.15); } }

/* ---------- Clients ---------- */
.clients { padding-top: clamp(40px, 6vw, 72px); text-align: center; }
.clients__title { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.clients__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 2.25rem; }
.clients__list li { font-size: clamp(1.1rem, 1rem + .7vw, 1.6rem); font-weight: 800; letter-spacing: -.03em; color: var(--muted); opacity: .85; transition: color .2s, opacity .2s; }
.clients__list li:hover { color: var(--text); opacity: 1; }

/* ---------- Projets ---------- */
.project-grid { display: grid; gap: var(--gap); }
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }
.project-card { min-width: 0; }
.project-card[hidden] { display: none; }
.project-card__link { display: flex; flex-direction: column; height: 100%; padding: 10px; border-radius: var(--r-lg); background: var(--surface); text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s; }
.project-card__link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card__media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card__link:hover .project-card__media img { transform: scale(1.045); }
.project-card__arrow { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #161f28; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .35); opacity: 0; transform: scale(.8) rotate(-45deg); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.project-card__arrow .ico { width: 18px; height: 18px; }
.project-card__link:hover .project-card__arrow, .project-card__link:focus-visible .project-card__arrow { opacity: 1; transform: none; }
@media (hover: none) { .project-card__arrow { opacity: 1; transform: none; } }
.project-card__body { padding: 16px 10px 10px; display: grid; gap: .45rem; }
.project-card__meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.project-card__client { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.project-card__title { font-size: 1.125rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }

.filters { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 6px; margin-bottom: clamp(20px, 3vw, 32px); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: .5rem; flex: none; min-height: 44px; padding: 0 1.1rem; border: 1.5px solid var(--line-strong); border-radius: 999px; background: transparent; font-weight: 600; font-size: .925rem; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip__count { font-size: .75rem; font-weight: 700; opacity: .6; }

/* Fiche projet */
.project-layout { display: grid; gap: var(--gap); padding-top: clamp(28px, 4vw, 48px); }
.project-hero { padding: 10px; overflow: hidden; }
.project-hero img { width: 100%; border-radius: var(--r-md); aspect-ratio: 16 / 10; object-fit: cover; }
.project-facts { display: flex; flex-direction: column; gap: 1.5rem; }
.project-facts dl { display: grid; gap: 1rem; }
.project-facts dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.project-facts dt { color: var(--muted); font-size: .9rem; }
.project-facts dd { font-weight: 700; text-align: right; }
@media (min-width: 960px) {
  .project-layout { grid-template-columns: 1fr 340px; align-items: start; }
  .project-facts { position: sticky; top: calc(var(--header-h) + 20px); }
  .project-body { grid-column: 1; }
}

/* ---------- Expertise / bento ---------- */
.bento { display: grid; gap: var(--gap); }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .bento--3 { grid-template-columns: repeat(3, 1fr); } }
.service { display: flex; flex-direction: column; gap: .75rem; transition: transform .35s var(--ease), background-color .3s; }
.service:hover { transform: translateY(-3px); }
.service__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: .5rem; }
.service__icon .ico { width: 26px; height: 26px; }
.service__title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stack { grid-column: 1 / -1; display: grid; gap: 1.1rem; }
.stack__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
@media (min-width: 1024px) { .stack { grid-template-columns: 200px 1fr; align-items: center; } }

.process { display: grid; gap: var(--gap); counter-reset: step; }
@media (min-width: 640px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process__step { display: flex; flex-direction: column; gap: .6rem; }
.process__num { font-size: 2.75rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--accent); margin-bottom: .5rem; }
.process__title { font-size: 1.2rem; font-weight: 700; }

.split { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

.faq { display: grid; gap: .75rem; max-width: 860px; }
.faq__item { padding: 0; }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 22px clamp(20px, 3vw, 32px); cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__q { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.faq__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); transition: transform .3s var(--ease); }
.faq__icon .ico { width: 18px; height: 18px; }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__item > p { padding: 0 clamp(20px, 3vw, 32px) 24px; max-width: 65ch; }

/* ---------- Expérience ---------- */
.xp-grid { display: grid; gap: var(--gap); }
@media (min-width: 640px) { .xp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .xp-grid { grid-template-columns: repeat(3, 1fr); } }
.xp { display: flex; flex-direction: column; gap: .6rem; }
.xp__company { font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.xp__company span { font-weight: 600; color: var(--muted); }
.xp__role { font-weight: 600; }
.xp__desc { flex: 1; }
.xp__period { margin-top: .5rem; align-self: flex-end; font-size: .825rem; font-weight: 600; color: var(--accent-ink); }
.xp--current { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- À propos ---------- */
.about-grid { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(280px, 420px) 1fr; align-items: center; } }
.about-photo { margin: 0; display: grid; place-items: center; padding: clamp(8px, 3vw, 32px) 0; }
/* Portrait détouré dans un cercle, halo resserré autour du visage */
.about-photo__halo { position: relative; width: min(100%, 200px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; isolation: isolate;
  box-shadow: none; }
.about-photo__halo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 40%, transparent 58%, var(--halo-vignette) 100%); }
.about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--portrait-filter); }
@media (min-width: 900px) { .about-photo__halo { width: min(100%, 280px); } }
:root { --portrait-filter: grayscale(1) brightness(1.1) contrast(.94); --halo-core: #e6eefa; --halo-mid: #cfdcef; --halo-edge: #b3c4dc; --halo-ring: rgba(0, 128, 255, .08); --halo-vignette: rgba(16, 23, 29, .18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --portrait-filter: grayscale(1); --halo-core: #2c3947; --halo-mid: #1f2a36; --halo-edge: #141c25; --halo-ring: rgba(255, 255, 255, .03); --halo-vignette: rgba(0, 0, 0, .35); } }
:root[data-theme="dark"] { --portrait-filter: grayscale(1); --halo-core: #2c3947; --halo-mid: #1f2a36; --halo-edge: #141c25; --halo-ring: rgba(255, 255, 255, .03); --halo-vignette: rgba(0, 0, 0, .35); }
.lang__flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.lang { display: inline-flex; align-items: center; gap: .55rem; }
.about-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.timeline { position: relative; display: grid; gap: var(--gap); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-left: 36px; display: grid; gap: .6rem; }
.timeline__item::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line-strong); }
.timeline__item.is-current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.timeline__period { font-size: .875rem; font-weight: 700; color: var(--accent-ink); }
.timeline__company { font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; margin-bottom: .35rem; }
.timeline__company .muted { font-weight: 500; }
.timeline__role { font-weight: 600; margin-bottom: .35rem; }
@media (min-width: 900px) {
  .timeline::before { left: 207px; }
  .timeline__item { grid-template-columns: 180px 1fr; gap: 0 56px; padding-left: 0; }
  .timeline__item::before { left: 200px; top: 30px; }
  .timeline__period { padding-top: 26px; text-align: right; }
}

.facts { display: grid; gap: 1rem; }
.facts li { display: grid; gap: .15rem; }
.facts strong { font-weight: 700; }

/* ---------- Prose ---------- */
.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.6em; }
.prose strong { font-weight: 700; color: var(--text); }
.prose a:not(.btn) { color: var(--accent-ink); font-weight: 600; }
.prose ul { padding-left: 1.1rem; list-style: disc; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose code { font-family: var(--mono); font-size: .9em; padding: .15em .4em; border-radius: 6px; background: var(--surface-2); }
.prose--legal { max-width: 860px; }
.about-body p { color: var(--muted); }
.about-body p strong { color: var(--text); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--gap); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.55fr 1fr; align-items: start; } }
.contact-aside { display: grid; gap: var(--gap); }
.contact-list { display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-list .ico { color: var(--accent-ink); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-form form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.form-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .45rem; }
.field label { font-size: .9rem; font-weight: 700; }
.req { color: var(--accent); }
.opt { font-weight: 500; color: var(--muted); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: #e5484d !important; }
.field__error { color: #e5484d; font-size: .875rem; font-weight: 600; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: .75rem; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent-bg); }
.field--check label { font-weight: 500; font-size: .925rem; color: var(--muted); }
.field--check label a { color: var(--accent-ink); }
.field--check .field__error { grid-column: 2; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: var(--r-sm); font-weight: 600; margin-top: 1rem; }
.alert--error { background: rgba(229, 72, 77, .1); color: #e5484d; }
.success { display: grid; justify-items: start; gap: 1rem; padding-block: 1rem; }
.success__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; }
.success__icon .ico { width: 32px; height: 32px; stroke-width: 2.4; }

/* ---------- Erreur ---------- */
.error-page { padding-top: clamp(32px, 6vw, 72px); }
.error-card { display: grid; justify-items: start; gap: 1.25rem; padding: clamp(28px, 6vw, 72px); }
.error-code { font-size: clamp(4rem, 3rem + 8vw, 9rem); font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.error-code .brace { color: var(--accent); font-weight: 300; }

/* ---------- Footer ---------- */
.site-footer { padding-top: clamp(64px, 9vw, 128px); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.footer-cta { display: grid; gap: 1.5rem; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: var(--r-xl); overflow: hidden; }
.footer-cta::after { content: "{ }"; position: absolute; right: -10px; bottom: -40px; font-size: clamp(8rem, 18vw, 15rem); font-weight: 300; line-height: 1; color: rgba(255, 255, 255, .1); pointer-events: none; }
.footer-cta > * { position: relative; z-index: 1; }
.footer-cta__title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; max-width: 20ch; text-wrap: balance; }
.footer-cta .dot { color: #fff; }
@media (min-width: 900px) { .footer-cta { grid-template-columns: 1fr auto; } }
.footer-grid { display: grid; gap: 2rem; padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.3fr 1fr; } }
.footer-col--brand { display: grid; gap: 1rem; justify-items: start; max-width: 360px; }
.footer-title { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .65rem; }
.footer-col a { text-decoration: none; font-weight: 500; }
.footer-col a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-contact li { display: flex; align-items: center; gap: .6rem; overflow-wrap: anywhere; }
.footer-contact .ico { color: var(--muted); width: 1.1em; height: 1.1em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 24px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); text-decoration: underline; }
/* Sélecteur de langue : discret, segmenté, drapeaux vectoriels */
.footer-bottom { align-items: center; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.lang-switch__opt { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease); }
.footer-bottom .lang-switch__opt:hover { color: var(--text); text-decoration: none; }
.lang-switch__opt[aria-current] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 4px rgba(16, 23, 29, .14); }
.lang-switch__flag { border-radius: 2px; box-shadow: 0 0 0 1px var(--line); opacity: .7; transition: opacity .2s; }
.lang-switch__opt[aria-current] .lang-switch__flag, .lang-switch__opt:hover .lang-switch__flag { opacity: 1; }

/* ---------- Apparition au défilement ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .hero__card > * { animation: rise .8s var(--ease) both; }
  .hero__card > *:nth-child(2) { animation-delay: .06s; }
  .hero__card > *:nth-child(3) { animation-delay: .12s; }
  .hero__card > *:nth-child(4) { animation-delay: .18s; }
  .hero__card > *:nth-child(5) { animation-delay: .24s; }
  .hero__visual .geek { animation: pop 1s var(--ease) .15s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

@media print {
  .site-header, .site-footer, .hero__visual, .filters { display: none !important; }
  .card { background: none; padding: 0; }
}
.nowrap { white-space: nowrap; }
