/* =============================================================
   Valentin Martel — Portfolio
   Feuille de style unique, sans dépendance externe.
   Sommaire :
     01. Reset & base
     02. Tokens (couleurs, typo, espacements)
     03. Utilitaires & primitives (boutons, liens, titres)
     04. Header & navigation
     05. Hero
     06. Marquee
     07. À propos
     08. Services
     09. Projets
     10. Stack
     11. Parcours
     12. Témoignages
     13. Contact & formulaire
     14. Footer
     15. Modale projet
     16. Command palette
     17. Toast
     18. Animations & reveal
     19. Responsive
     20. Impression & préférences
     21. Visuels réels — captures d'écran
   ============================================================= */

/* ── 01. Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }

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

::selection { background: var(--accent); color: #fff; }

/* Barre de défilement discrète */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }


/* ── 02. Tokens ───────────────────────────────────────────── */
:root {
  /* Typographies : aucune requête réseau, rendu natif optimal */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, "New York", "Iowan Old Style", Georgia,
                  "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Échelle typographique fluide */
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.78rem;
  --fs-lead: clamp(1.1rem, 1rem + 0.5vw, 1.32rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-hero: clamp(2.4rem, 1.1rem + 5vw, 4.8rem);

  /* Rythme */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 10vw, 9.5rem);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Mouvement */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  /* Éditorial : aucune couleur d'accent. Le contraste fait le travail. */
  --accent: currentColor;
  --accent-2: currentColor;
  --accent-soft: transparent;
  --grad: none;
}

/* Thème clair — encre sur papier */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-alt: #f4f3f0;
  --surface: transparent;
  --surface-hover: rgba(10, 10, 10, .04);
  --border: rgba(10, 10, 10, .14);
  --border-strong: rgba(10, 10, 10, .34);
  --text: #0a0a0a;
  --text-muted: #5e5c58;
  --text-dim: #8d8a85;
  --shadow: none;
  --shadow-lg: none;
  --glow: none;
}

/* Thème sombre — encre inversée */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elevated: #0a0a0a;
  --bg-alt: #131211;
  --surface: transparent;
  --surface-hover: rgba(255, 255, 255, .05);
  --border: rgba(255, 255, 255, .16);
  --border-strong: rgba(255, 255, 255, .38);
  --text: #f4f3f0;
  --text-muted: #a3a09a;
  --text-dim: #77746e;
  --shadow: none;
  --shadow-lg: none;
  --glow: none;
}


/* ── 03. Utilitaires & primitives ─────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--alt::before,
.section--alt::after {
  content: "";
  position: absolute; inset-inline: 0; height: 1px;
  background: var(--border);
}
.section--alt::before { top: 0; }
.section--alt::after { bottom: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 500;
}
.muted { color: var(--text-muted); }

.sec-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.eyebrow > span:first-child {
  color: var(--accent);
  padding: .2rem .5rem;
  border: 1px solid var(--accent-soft);
  border-radius: 99px;
  background: var(--accent-soft);
}

.sec-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.sec-sub {
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 40rem;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--accent); color: #fff;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Boutons */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.5rem;
  border-radius: 99px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease);
}
.btn svg {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  --btn-bg: var(--text);
  --btn-fg: var(--bg);
  box-shadow: var(--shadow);
}
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: var(--grad);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.btn--primary:hover { --btn-fg: #fff; box-shadow: var(--glow); }
.btn--primary:hover::before { opacity: 1; }

.btn--ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--surface-hover); border-color: var(--text-dim); }

.btn--sm { padding: .6rem 1.15rem; font-size: var(--fs-xs); }
.btn--full { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  position: relative;
}
.link-arrow::after {
  content: "→";
  transition: transform .3s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* Badge de disponibilité */
.badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  letter-spacing: .03em;
  color: var(--text-muted);
}
.badge__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2) 70%, transparent);
  animation: pulse 2.4s var(--ease-io) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Fond animé */
.bg-orbs { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  will-change: transform;
}
.bg-orbs span:nth-child(1) {
  width: 46vw; height: 46vw; top: -14vw; left: -8vw;
  background: var(--accent);
  animation: float1 26s var(--ease-io) infinite alternate;
}
.bg-orbs span:nth-child(2) {
  width: 38vw; height: 38vw; top: 42vh; right: -10vw;
  background: var(--accent-2);
  opacity: .18;
  animation: float2 32s var(--ease-io) infinite alternate;
}
.bg-orbs span:nth-child(3) {
  width: 30vw; height: 30vw; bottom: -8vw; left: 30vw;
  background: #ff6ba8;
  opacity: .12;
  animation: float3 38s var(--ease-io) infinite alternate;
}
[data-theme="light"] .bg-orbs span { opacity: .16; }
[data-theme="light"] .bg-orbs span:nth-child(2) { opacity: .12; }
[data-theme="light"] .bg-orbs span:nth-child(3) { opacity: .08; }

@keyframes float1 { to { transform: translate3d(9vw, 7vh, 0) scale(1.15); } }
@keyframes float2 { to { transform: translate3d(-11vw, -9vh, 0) scale(1.2); } }
@keyframes float3 { to { transform: translate3d(6vw, -6vh, 0) scale(.9); } }

/* Barre de progression de lecture */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 120; pointer-events: none;
}
.scroll-progress i {
  display: block; height: 100%; width: 0%;
  background: var(--grad);
  transform-origin: left;
  transition: width .1s linear;
}


/* ── 04. Header & navigation ──────────────────────────────── */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  padding-block: 1.1rem;
  transition: padding .35s var(--ease), background-color .35s var(--ease),
              border-color .35s var(--ease), backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  padding-block: .65rem;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
}
.header__inner { display: flex; align-items: center; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: var(--shadow);
}
.brand__text {
  font-weight: 650; font-size: .95rem; letter-spacing: -0.02em;
}

.nav {
  display: flex; align-items: center; gap: .25rem;
  margin-inline: auto;
  padding: .3rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.nav a {
  padding: .5rem .95rem;
  border-radius: 99px;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-muted);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-hover); }
.nav a.is-active { color: var(--text); background: var(--surface-hover); }

.header__tools { display: flex; align-items: center; gap: .5rem; flex: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: 38px; min-width: 38px; padding-inline: .55rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-muted);
  backdrop-filter: blur(12px);
  transition: color .25s var(--ease), background-color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-hover); transform: translateY(-1px); }
.icon-btn svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn kbd {
  font-family: var(--font-mono); font-size: .68rem;
  color: var(--text-dim);
}
.lang-label { font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }

.ico-moon { display: none; }
[data-theme="light"] .ico-sun { display: none; }
[data-theme="light"] .ico-moon { display: block; }

.burger { display: none; }


/* ── 05. Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-block: 8rem 4rem;
  overflow: hidden;
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 0%, transparent 75%);
  opacity: .7;
}
.hero__inner { width: 100%; }

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -0.045em;
  margin-block: 1.6rem 0;
  max-width: 22ch;
}
.hero__title .line { display: block; }
.hero__title em {
  font-style: italic;
  color: var(--text-muted);
}

.hero__lead {
  margin-top: 1.9rem;
  max-width: 46ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero__roles {
  margin-top: 1.5rem;
  display: flex; align-items: center; gap: .7rem;
  flex-wrap: wrap;
}
.rotator {
  display: inline-block;
  position: relative;
  height: 1.5em;
  overflow: hidden;
  vertical-align: bottom;
}
.rotator__word {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--accent);
  animation: rotIn .5s var(--ease) both;
}
.rotator__word.is-out { animation: rotOut .35s var(--ease) both; }
@keyframes rotIn  { from { transform: translateY(100%); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes rotOut { from { transform: none; opacity: 1 } to { transform: translateY(-100%); opacity: 0 } }

.hero__actions {
  margin-top: 2.6rem;
  display: flex; flex-wrap: wrap; gap: .8rem;
}

.hero__stats {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--border);
  max-width: 52rem;
}
.hero__stats li { display: flex; flex-direction: column; gap: .2rem; }
.hero__stats b {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero__stats span {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 16ch;
}

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%;
  translate: -50% 0;
  width: 24px; height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  display: grid; place-items: start center;
  padding-top: 7px;
}
.scroll-cue span {
  width: 3px; height: 7px; border-radius: 99px;
  background: var(--text-muted);
  animation: cue 1.9s var(--ease-io) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1 }
  50%      { transform: translateY(11px); opacity: .2 }
}


/* ── 06. Marquee ──────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  padding-block: 1.4rem;
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 2.4rem;
  width: max-content;
  animation: scrollX 46s linear infinite;
}
.marquee span {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee i { color: var(--accent); font-size: .55rem; font-style: normal; }
@keyframes scrollX { to { transform: translateX(-50%); } }


/* ── 07. À propos ─────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about__media { position: sticky; top: 7rem; }

.portrait {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  aspect-ratio: 4 / 5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__glow {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, color-mix(in oklab, var(--bg) 85%, transparent) 100%);
  pointer-events: none;
}
.portrait__card {
  margin-top: -2.6rem;
  margin-inline: 1.2rem 0;
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: .1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: color-mix(in oklab, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.portrait__card b { font-size: 1.05rem; letter-spacing: -0.02em; }
.portrait__card .mono { font-size: .68rem; }

.about__body .lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}
.about__body p + p { margin-top: 1.1rem; color: var(--text-muted); }
.about__body b { color: var(--text); font-weight: 650; }

.facts {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.facts li {
  background: var(--bg);
  padding: 1.15rem 1.25rem;
  display: flex; flex-direction: column; gap: .25rem;
  transition: background-color .3s var(--ease);
}
.facts li:hover { background: var(--surface-hover); }
.facts b { font-size: var(--fs-sm); font-weight: 650; letter-spacing: -0.01em; }
.facts span { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.45; }

.about__cta {
  margin-top: 2.2rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: 1.4rem;
}


/* ── 08. Services ─────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.2rem;
}
.card {
  position: relative;
  padding: 2rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: transform .45s var(--ease), border-color .35s var(--ease),
              box-shadow .45s var(--ease);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%),
              var(--accent-soft), transparent 45%);
  opacity: 0;
  transition: opacity .45s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }

.card--featured { border-color: var(--accent-soft); }
.card--featured::after {
  content: "";
  position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: var(--grad);
}

.card__num {
  position: absolute; top: 1.5rem; right: 1.6rem;
  color: var(--text-dim);
}
.card__tag {
  display: inline-block;
  margin-bottom: .9rem;
  padding: .25rem .7rem;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .66rem; letter-spacing: .05em; text-transform: uppercase;
}
.card__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 1.3rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--accent);
}
.card__icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.card h3 {
  font-size: var(--fs-h3);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: .7rem;
}
.card > p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.65; }
.card__list {
  margin-top: 1.4rem; padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .55rem;
}
.card__list li {
  display: flex; align-items: baseline; gap: .6rem;
  font-size: var(--fs-sm); color: var(--text-muted);
}
.card__list li::before {
  content: "";
  width: 5px; height: 5px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  translate: 0 -2px;
}


/* ── 09. Projets ──────────────────────────────────────────── */
.filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 2rem;
}
.filter {
  padding: .5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-muted);
  transition: all .25s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.is-active {
  background: var(--text); color: var(--bg);
  border-color: var(--text);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.project {
  grid-column: span 1;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  cursor: pointer;
  transition: transform .45s var(--ease), border-color .35s var(--ease),
              box-shadow .45s var(--ease), opacity .35s var(--ease);
}
.project--wide { grid-column: span 2; flex-direction: row; }
.project:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.project.is-hidden { display: none; }

.project__visual {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.project--wide .project__visual {
  aspect-ratio: auto;
  flex: 0 0 44%;
  border-bottom: 0;
  border-inline-end: 1px solid var(--border);
}
.project__visual::before {
  content: "";
  position: absolute; inset: 0;
  opacity: .9;
  transition: transform .7s var(--ease), opacity .5s var(--ease);
}
.project__visual[data-visual="a"]::before { background: linear-gradient(140deg, #7c5cff, #00dcb4); }
.project__visual[data-visual="b"]::before { background: linear-gradient(140deg, #ff6ba8, #7c5cff); }
.project__visual[data-visual="c"]::before { background: linear-gradient(140deg, #00dcb4, #4d8bff); }
.project__visual[data-visual="d"]::before { background: linear-gradient(140deg, #ffb347, #ff6ba8); }
.project__visual[data-visual="e"]::before { background: linear-gradient(140deg, #4d8bff, #a78bff); }
.project__visual::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: 34px 34px;
  mix-blend-mode: overlay;
}
.project:hover .project__visual::before { transform: scale(1.08); }

.project__initial {
  position: relative; z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 400;
  color: rgba(255, 255, 255, .92);
  letter-spacing: -0.04em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .3);
  transition: transform .6s var(--ease);
}
.project:hover .project__initial { transform: scale(1.06); }

.project__body {
  display: flex; flex-direction: column;
  padding: 1.7rem 1.7rem 1.8rem;
  flex: 1;
}
.project--wide .project__body { padding: clamp(1.7rem, 3vw, 2.6rem); justify-content: center; }

.project__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  color: var(--text-dim);
  margin-bottom: .8rem;
}
.project__meta .dot { color: var(--border-strong); }

.project__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: .7rem;
}
.project__desc {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.65;
  text-wrap: pretty;
}
.project--wide .project__desc { font-size: var(--fs-base); max-width: 46ch; }

.project__tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: 1.2rem;
}
.project__tags li {
  padding: .25rem .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: .68rem;
  text-transform: none;
  letter-spacing: 0;
}
.project__cta { margin-top: 1.4rem; align-self: flex-start; }

.work-empty {
  text-align: center; padding: 3rem 0;
  color: var(--text-muted);
}


/* ── 10. Stack ────────────────────────────────────────────── */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
}
.stack__group {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elevated);
  transition: border-color .3s var(--ease);
}
.stack__group:hover { border-color: var(--border-strong); }
.stack__title { color: var(--accent); margin-bottom: 1.2rem; }

.chips { display: flex; flex-direction: column; gap: .85rem; }
.chips li { display: flex; flex-direction: column; gap: .4rem; }
.chips span { font-size: var(--fs-sm); font-weight: 500; }
.lvl {
  display: block; height: 3px; border-radius: 99px;
  background: var(--border);
  position: relative; overflow: hidden;
}
.lvl::after {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: var(--lvl, 50%);
  background: var(--grad);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease);
}
.stack__group.is-visible .lvl::after { transform: scaleX(1); }


/* ── 11. Parcours ─────────────────────────────────────────── */
.timeline { position: relative; padding-left: 0; }
.tl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  position: relative;
  transition: background-color .35s var(--ease);
}
.tl:last-child { border-bottom: 1px solid var(--border); }
.tl::before {
  content: "";
  position: absolute; left: -1.5rem; right: -1.5rem; top: 0; bottom: 0;
  border-radius: var(--r);
  background: var(--surface);
  opacity: 0;
  transition: opacity .35s var(--ease);
  z-index: -1;
}
.tl:hover::before { opacity: 1; }

.tl__date { color: var(--accent); padding-top: .35rem; }
.tl__body h3 {
  font-size: var(--fs-h3);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: .25rem;
}
.tl__org { font-size: var(--fs-sm); font-weight: 600; margin-bottom: .7rem; }
.tl__body p:last-child { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.65; max-width: 52ch; }


/* ── 12. Témoignages ──────────────────────────────────────── */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}
.quote {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.6rem;
  padding: 2rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  position: relative;
  transition: transform .45s var(--ease), border-color .3s var(--ease);
}
.quote:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.quote::before {
  content: "“";
  position: absolute; top: .2rem; right: 1.4rem;
  font-family: var(--font-display);
  font-size: 5rem; line-height: 1;
  color: var(--accent);
  opacity: .18;
}
.quote blockquote {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.quote figcaption { display: flex; flex-direction: column; gap: .1rem; }
.quote figcaption b { font-size: var(--fs-sm); font-weight: 650; }
.quote figcaption span { font-size: var(--fs-xs); }


/* ── 13. Contact & formulaire ─────────────────────────────── */
.section--contact { position: relative; }
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact__list {
  margin-top: 2.5rem;
  display: flex; flex-direction: column;
}
.contact__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-block: .9rem;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.contact__list li:last-child { border-bottom: 1px solid var(--border); }
.contact__list .mono { flex: none; }
.contact__list a { color: var(--accent); font-weight: 600; }
.contact__list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact__list b { font-weight: 600; text-align: right; }

.socials { display: flex; gap: .6rem; margin-top: 1.8rem; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  transition: all .3s var(--ease);
}
.socials a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--glow);
}
.socials svg { width: 19px; height: 19px; fill: currentColor; }

.form {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  margin-bottom: .45rem;
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: var(--fs-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }
.field select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field__err {
  display: none;
  margin-top: .4rem;
  font-size: var(--fs-xs);
  color: #ff6b81;
}
.field.has-error input,
.field.has-error textarea { border-color: #ff6b81; }
.field.has-error .field__err { display: block; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form__status {
  margin-top: .9rem;
  font-size: var(--fs-sm);
  text-align: center;
  min-height: 1.4em;
}
.form__status.is-ok { color: var(--accent-2); }
.form__status.is-err { color: #ff6b81; }
.form__note { margin-top: .8rem; text-align: center; color: var(--text-dim); }

.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading .btn__label::after {
  content: "…";
  animation: dots 1.2s steps(4) infinite;
}
@keyframes dots { 0% { content: "" } 25% { content: "." } 50% { content: ".." } 75% { content: "..." } }


/* ── 14. Footer ───────────────────────────────────────────── */
.footer {
  position: relative;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: 3rem 2.5rem;
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.footer__brand { display: flex; align-items: flex-start; gap: .9rem; }
.footer__brand p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  max-width: 34ch;
  line-height: 1.55;
}
.footer__nav {
  display: flex; flex-wrap: wrap; gap: .4rem 1.4rem;
  justify-content: flex-end;
}
.footer__nav a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: color .25s var(--ease);
}
.footer__nav a:hover { color: var(--accent); }
.footer__legal {
  grid-column: 1 / -1;
  padding-top: 2rem;
  margin-top: .5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: .02em;
}

.to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in oklab, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(14px);
  color: var(--text-muted);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: all .35s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.to-top svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}


/* ── 15. Modale projet ────────────────────────────────────── */
.modal, .palette { position: fixed; inset: 0; z-index: 150; }
.modal[hidden], .palette[hidden] { display: none; }

.modal__backdrop, .palette__backdrop {
  position: absolute; inset: 0;
  background: color-mix(in oklab, #05050a 70%, transparent);
  backdrop-filter: blur(6px);
  animation: fadeIn .3s var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal__panel {
  position: relative;
  width: min(760px, calc(100% - 2rem));
  max-height: min(88svh, 900px);
  margin: clamp(1rem, 5vh, 4rem) auto;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: panelIn .45s var(--ease) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(24px) scale(.97) }
  to   { opacity: 1; transform: none }
}

.modal__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in oklab, var(--bg-elevated) 85%, transparent);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  transition: all .25s var(--ease);
}
.modal__close:hover { color: var(--text); background: var(--surface-hover); rotate: 90deg; }
.modal__close svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}

.modal__head {
  padding: 2.2rem 2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.modal__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-block: .5rem;
}
.modal__stack { color: var(--text-dim); text-transform: none; letter-spacing: 0; line-height: 1.6; }

.modal__content { padding: 1.8rem 2rem; overflow-y: auto; flex: 1; }
.modal__content h3 { color: var(--accent); margin-bottom: .9rem; }
.modal__content h3 + * { margin-bottom: 2rem; }
.modal__content p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.7; }
.modal__content p + p { margin-top: .9rem; }

.modal__results { display: flex; flex-direction: column; gap: .7rem; }
.modal__results li {
  display: flex; align-items: baseline; gap: .7rem;
  font-size: var(--fs-sm);
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.modal__results li::before {
  content: "▲";
  color: var(--accent-2);
  font-size: .6rem;
  flex: none;
}

.modal__foot {
  display: flex; flex-wrap: wrap; gap: .7rem;
  padding: 1.3rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}


/* ── 16. Command palette ──────────────────────────────────── */
.palette__panel {
  position: relative;
  width: min(600px, calc(100% - 2rem));
  margin: clamp(3rem, 12vh, 8rem) auto 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: color-mix(in oklab, var(--bg-elevated) 96%, transparent);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: panelIn .35s var(--ease) both;
}
.palette__search {
  display: flex; align-items: center; gap: .8rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.palette__search svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: var(--text-dim); stroke-width: 1.9; stroke-linecap: round;
}
.palette__search input {
  flex: 1; border: 0; background: none; outline: none;
  font-size: 1rem;
}
.palette__search input::placeholder { color: var(--text-dim); }
.palette__search kbd,
.palette__foot kbd {
  padding: .15rem .4rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--text-dim);
}

.palette__list { max-height: 46svh; overflow-y: auto; padding: .5rem; }
.palette__list li {
  display: flex; align-items: center; gap: .8rem;
  padding: .65rem .8rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  transition: background-color .15s var(--ease);
}
.palette__list li[aria-selected="true"] { background: var(--accent-soft); }
.palette__list li .pl-kind {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
}
.palette__list li .pl-ico {
  display: grid; place-items: center;
  width: 26px; height: 26px; flex: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  font-size: .75rem;
}
.palette__empty {
  justify-content: center;
  padding: 1.6rem; text-align: center;
  color: var(--text-dim); font-size: var(--fs-sm);
  cursor: default;
}
.palette__foot {
  display: flex; gap: 1.2rem;
  padding: .7rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-dim);
  text-transform: none; letter-spacing: .02em;
}
.palette__foot span { display: inline-flex; align-items: center; gap: .35rem; }


/* ── 17. Toast ────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 200;
  translate: -50% 0;
  padding: .8rem 1.3rem;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  background: color-mix(in oklab, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); font-weight: 500;
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: all .4s var(--ease);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: none; }


/* ── 18. Animations & reveal ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

body.is-locked { overflow: hidden; }


/* ── 19. Responsive ───────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav { position: static; }
  .header__cta { display: none; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 5rem; }

  .nav {
    position: fixed;
    inset: 0 0 auto;
    top: 0;
    flex-direction: column;
    justify-content: center;
    gap: .5rem;
    padding: 6rem 2rem 3rem;
    min-height: 100svh;
    border: 0; border-radius: 0;
    background: color-mix(in oklab, var(--bg) 96%, transparent);
    backdrop-filter: blur(24px);
    margin: 0;
    opacity: 0; visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    padding: .4rem 1rem;
    color: var(--text);
  }

  .header__tools { margin-left: auto; }
  .kbd-hint { display: none; }

  .burger {
    display: grid; place-items: center; gap: 5px;
    width: 38px; height: 38px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    position: relative; z-index: 2;
  }
  .burger span {
    display: block; width: 16px; height: 1.6px;
    background: var(--text); border-radius: 2px;
    transition: transform .3s var(--ease), opacity .25s var(--ease);
  }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.3px) rotate(-45deg); }

  .hero { min-height: auto; padding-block: 8rem 4rem; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1rem; }
  .scroll-cue { display: none; }

  .about { grid-template-columns: 1fr; }
  .about__media { position: static; max-width: 24rem; }

  .work-grid { grid-template-columns: 1fr; }
  .project--wide { grid-column: span 1; flex-direction: column; }
  .project--wide .project__visual {
    flex: none; aspect-ratio: 16 / 10;
    border-inline-end: 0;
    border-bottom: 1px solid var(--border);
  }

  .tl { grid-template-columns: 1fr; gap: .5rem; }
  .tl__date { padding-top: 0; }

  .contact { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .brand__text { display: none; }
  .hero__title { max-width: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .modal__head, .modal__content, .modal__foot { padding-inline: 1.3rem; }
  .palette__foot { display: none; }
  .to-top { right: 1rem; bottom: 1rem; }
}


/* ── 20. Impression & préférences ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bg-orbs span { animation: none; }
  .marquee__track { animation: none; }
}

@media print {
  .header, .scroll-cue, .to-top, .bg-orbs, .marquee, .filters,
  .form, .socials, .scroll-progress, .modal, .palette, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; page-break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .7em; color: #555; }
}

/* =============================================================
   21. Visuels réels — captures d'écran
   ============================================================= */

/* Capture pleine largeur (sites web) */
.project__visual[data-fit="cover"] img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.project__visual[data-fit="cover"]::after { opacity: .3; }

/* Deux écrans de téléphone côte à côte */
.project__visual[data-fit="phones"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3%;
  padding: 6%;
}
/* hauteur définie : sinon les enfants en % n'ont pas de référence */
.project--wide .project__visual[data-fit="phones"] { aspect-ratio: 5 / 4; }

.project__visual[data-fit="phones"] > img,
.project__visual[data-fit="phones"] > .phone-play {
  position: relative;
  z-index: 1;
  height: 100%;
  width: auto;
  max-width: 45%;
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .14);
  transition: transform .7s var(--ease);
}
.project__visual[data-fit="phones"] > img {
  object-fit: contain;
  rotate: -5deg;
  translate: 0 4%;
}

/* L'écran de droite « joue » le parcours réel en boucle */
.phone-play {
  aspect-ratio: 510 / 1100;
  overflow: hidden;
  background: #000;
  rotate: 5deg;
  translate: 0 -4%;
  z-index: 2;
}
.phone-play img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: phoneCycle 14s var(--ease-io) infinite;
  animation-delay: calc(var(--i) * 3.5s);
}
@keyframes phoneCycle {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  22%  { opacity: 1; }
  27%  { opacity: 0; }
  100% { opacity: 0; }
}

.project:hover .project__visual[data-fit="cover"] img { transform: scale(1.04); }
.project:hover .project__visual[data-fit="phones"] > img { transform: translateY(-8px) rotate(3deg); }
.project:hover .project__visual[data-fit="phones"] > .phone-play { transform: translateY(-8px) rotate(-3deg); }

/* Démo vidéo dans la modale */
.modal__video { margin-bottom: 1.8rem; }
.modal__video[hidden] { display: none; }
.modal__video video {
  display: block;
  height: clamp(300px, 52vh, 520px);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #000;
}

/* Galerie de captures dans la modale */
.modal__shots {
  display: flex;
  gap: .9rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: .7rem;
  margin-bottom: 2rem;
}
.modal__shots:empty { display: none; }
.modal__shots img {
  flex: 0 0 auto;
  height: clamp(260px, 42vh, 430px);
  width: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  scroll-snap-align: start;
}

@media (max-width: 900px) {
  .project--wide .project__visual[data-fit="phones"] { aspect-ratio: 16 / 10; }
}
@media (max-width: 720px) {
  .project__visual[data-fit="phones"] { padding: 5%; }
}

@media (prefers-reduced-motion: reduce) {
  .project__visual img { transition: none; }
  .project:hover .project__visual img { transform: none; }
  /* pas de défilement automatique : on fige sur le dernier écran */
  .phone-play img { animation: none; opacity: 0; }
  .phone-play img:last-child { opacity: 1; }
}

/* =============================================================
   22. Direction éditoriale — encre sur papier
   Aucune couleur d'accent, aucun effet : c'est le contraste,
   l'échelle typographique et le vide qui structurent la page.
   ============================================================= */

:root {
  /* Angles nets plutôt qu'arrondis de template */
  --r-sm: 2px;
  --r: 3px;
  --r-lg: 4px;
  --r-xl: 6px;

  /* Échelle plus haute : le titre porte la page */
  --fs-hero: clamp(2.6rem, 1rem + 6.6vw, 6.2rem);
  --fs-h2: clamp(2.1rem, 1.3rem + 3.2vw, 3.9rem);
  --wrap: 1140px;
  --section-y: clamp(5.5rem, 11vw, 10.5rem);
}

::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* Plus aucun verre dépoli */
.header, .card, .portrait__card, .modal__panel, .project, .form,
.toast, .icon-btn, .badge { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Le dégradé de titre devient de l'encre */
.grad { background: none; color: inherit; -webkit-text-fill-color: currentColor; }

/* Sections : plus d'aplat gris, un simple filet */
.section--alt { background: transparent; }
.section--alt::after { display: none; }
.section--alt::before { background: var(--border); }

/* Numéro de section en marge, sans pastille */
.eyebrow > span:first-child {
  color: var(--text-dim);
  padding: 0;
  border: 0;
  background: none;
}
.eyebrow { gap: 1.1rem; letter-spacing: .12em; }

/* Titres : serif, grands, serrés */
.hero__title, .sec-title { letter-spacing: -0.035em; line-height: 1.02; }
.hero__title { font-weight: 400; }
.hero__title em { font-style: italic; }
.hero__lead { max-width: 34ch; }

/* Boutons : rectangulaires, filet net, aucun relief */
.btn { border-radius: 2px; box-shadow: none; }
.btn:hover { transform: none; }
.btn--primary { box-shadow: none; }
.btn--primary::before { display: none; }
.btn--ghost { border: 1px solid var(--border-strong); }
.btn--ghost:hover { background: var(--surface-hover); }
.icon-btn { border-radius: 2px; }

/* Pastille « disponible » : un carré, pas une LED qui clignote */
.badge { border-radius: 2px; }
.badge__dot {
  width: 6px; height: 6px;
  border-radius: 0;
  background: var(--text);
  box-shadow: none;
  animation: none;
}

/* Vignettes de projet : surface neutre, plus de dégradé ni de quadrillage */
.project__visual::before { background: var(--bg-alt) !important; }
.project__visual::after { display: none; }
.project__initial {
  font-family: var(--font-display);
  color: var(--text-dim);
  opacity: 1;
}
.project { border-radius: var(--r-lg); }
.project:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }

/* Cartes de service : filet, pas de carte flottante */
.card { border-radius: var(--r-lg); box-shadow: none; }
.card:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }
.card--featured { border-color: var(--border-strong); }

/* Chiffres du hero : composés comme des chiffres de journal */
.hero__stats b { font-variant-numeric: tabular-nums lining-nums; }

/* Portrait et médias : carrés */
.portrait, .portrait__card, .modal__panel, .modal__shots img,
.modal__video video, .form input, .form select, .form textarea {
  border-radius: var(--r);
}
.portrait__card { box-shadow: none; }

/* Mouvement réduit au strict nécessaire : une apparition, rien de plus */
.reveal { transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; }
}

/* =============================================================
   23. Visionneuse plein écran
   ============================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 180;              /* au-dessus de la modale projet (150) */
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(.5rem, 2vw, 2rem);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute; inset: 0;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  cursor: zoom-out;
}

.lightbox__img {
  position: relative;
  grid-column: 2;
  justify-self: center;
  max-width: 100%;
  max-height: calc(100svh - clamp(6rem, 14vw, 9rem));
  width: auto; height: auto;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  z-index: 2;
}
.lightbox__close,
.lightbox__nav {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.lightbox__close svg,
.lightbox__nav svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.lightbox__nav { position: relative; }
.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--next { grid-column: 3; }
.lightbox__nav[hidden] { visibility: hidden; display: grid; }

.lightbox__count {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%;
  translate: -50% 0;
  color: var(--text-muted);
}

/* Ce qui est agrandissable doit le dire */
.modal__shots img {
  cursor: zoom-in;
  transition: border-color .25s var(--ease);
}
.modal__shots img:hover,
.modal__shots img:focus-visible { border-color: var(--border-strong); }

@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__nav {
    position: absolute;
    bottom: clamp(1rem, 3vw, 2rem);
    grid-column: 1;
  }
  .lightbox__nav--prev { left: 22%; }
  .lightbox__nav--next { right: 22%; }
  .lightbox__img { grid-column: 1; max-height: calc(100svh - 11rem); }
}

/* =============================================================
   24. Typographie — titres en sans bold capitales
   Inspiration : jeannewurtz.framer.website (titres capitales
   très gras, ton direct, sections numérotées).
   ============================================================= */

:root {
  /* Les titres passent du serif au sans très gras */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
                  "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(2.3rem, .8rem + 6.2vw, 5.6rem);
  --fs-h2: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
}

.hero__title,
.sec-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: .96;
}

/* Contraste de graisse à l'intérieur du titre plutôt qu'un italique */
.hero__title em {
  font-style: normal;
  font-weight: 300;
}

/* Le chapô reste en corps de texte : lisible, pas hurlant */
.about__body .lead {
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

/* Titres de projet : gras, mais pas en capitales */
.project__title,
#modalTitle {
  font-weight: 750;
  letter-spacing: -0.025em;
}

/* Chiffres du hero et titres de carte suivent la même famille */
.hero__stats b { font-weight: 700; letter-spacing: -0.03em; }
.card h3 { font-weight: 700; letter-spacing: -0.02em; }

/* Numéros de section : plus présents, façon sommaire */
.eyebrow { font-weight: 600; }

/* =============================================================
   25. Polices auto-hébergées
   Clash Display (Fontshare) pour les titres, Inter (variable)
   pour le texte. Aucune requête réseau externe.
   ============================================================= */

@font-face {
  font-family: "Clash Display";
  src: url("../fonts/clash-display-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("../fonts/clash-display-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2-variations"),
       url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: "Clash Display", "Inter", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Arial, sans-serif;
}

/* Clash Display porte déjà sa graisse : pas besoin d'en rajouter */
.hero__title,
.sec-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.project__title,
#modalTitle,
.card h3,
.hero__stats b {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Libellé réservé aux lecteurs d'écran : invisible, mais bien annoncé */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =============================================================
   26. Mise en page — rythme et asymétrie
   Moins de blocs, moins de symétrie : c'est la régularité
   parfaite qui faisait « site généré ».
   ============================================================= */

/* Le numéro de section passe dans la marge, il ne fait plus partie du titre */
@media (min-width: 900px) {
  .sec-head {
    display: grid;
    grid-template-columns: 5rem 1fr;
    align-items: start;
    column-gap: 2rem;
    max-width: 58rem;
  }
  .sec-head .eyebrow {
    grid-column: 1;
    margin: .5rem 0 0;
    flex-direction: column;
    align-items: start;
    gap: .35rem;
  }
  .sec-head .sec-title,
  .sec-head .sec-sub { grid-column: 2; }
}

/* Hero : plus d'air au-dessus, la respiration remplace la flèche supprimée */
.hero__inner { padding-block: clamp(7rem, 16vh, 12rem) clamp(5rem, 12vh, 9rem); }

/* ── Grille de projets ─────────────────────────────────────── */
/* Une carte large sur deux est inversée : l'œil ne prend pas le pli */
.project--mirror { flex-direction: row-reverse; }
.project--mirror .project__visual {
  border-inline-end: 0;
  border-inline-start: 1px solid var(--border);
}

/* Décalage vertical des deux cartes centrales */
@media (min-width: 900px) {
  .work-grid { align-items: start; row-gap: clamp(2rem, 4vw, 4rem); }
  .work-grid .project:nth-of-type(3) { margin-top: clamp(2.5rem, 6vw, 6rem); }
}

/* ── Contact ───────────────────────────────────────────────── */
.contact { display: block; max-width: none; }

.contact__mail {
  display: block;
  margin-block: 1.5rem clamp(2.5rem, 6vw, 4.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 0.6rem + 4.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  border-bottom: 2px solid transparent;
  transition: border-color .3s var(--ease), opacity .3s var(--ease);
}
.contact__mail:hover { border-bottom-color: var(--text); }

.contact__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.contact__meta p { display: flex; flex-direction: column; gap: .25rem; }
.contact__meta a { border-bottom: 1px solid var(--border-strong); }
.contact__meta a:hover { border-bottom-color: var(--text); }
.contact__meta b { font-weight: 600; }

/* Éléments supprimés du HTML : on neutralise leurs styles résiduels */
.cards, .card, .form, .scroll-cue, .to-top, .quotes { display: none; }

/* =============================================================
   27. Arrondis et respiration
   Inspiré du landing spendrapp.com : échelle de rayons douce
   (8 / 14 / 20 / pilule) au lieu des angles à 2 px.
   ============================================================= */

:root {
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;
}

/* Les commandes du haut redeviennent des pastilles rondes */
.icon-btn {
  width: 42px; height: 42px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.burger { border-radius: var(--r-pill); }

/* Boutons : pilule, comme sur le landing */
.btn { border-radius: var(--r-pill); }
.btn--ghost { border: 1px solid var(--border-strong); }
.badge { border-radius: var(--r-pill); padding-inline: 1rem; }

/* Surfaces */
.project { border-radius: var(--r-lg); }
.project__visual { border-radius: 0; }
.modal__panel, .portrait, .portrait__card { border-radius: var(--r-lg); }
.modal__shots img, .modal__video video, .lightbox__img { border-radius: var(--r); }
.form input, .form textarea { border-radius: var(--r-sm); }
.lightbox__close, .lightbox__nav { border-radius: var(--r-pill); }

/* ── Respiration des titres ────────────────────────────────── */
.sec-head { margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.sec-head .eyebrow { margin-bottom: 1.6rem; }
.sec-title { line-height: 1.06; }
.sec-head .sec-sub { margin-top: 1.6rem; }
@media (min-width: 900px) {
  .sec-head { grid-template-columns: 8rem 1fr; column-gap: 3rem; }
}

/* ── Contact : coordonnées à gauche, formulaire à droite ───── */
.form { display: block; }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
}
.contact__grid .contact__meta {
  flex-direction: column;
  gap: 1.6rem;
  padding-top: 0;
  border-top: 0;
}

/* Rendu 3D vertical sur fond noir : on le montre entier, pas recadré */
.project__visual[data-fit="portrait"] {
  background: #000;
  display: grid;
  place-items: center;
  padding: 0;
}
.project__visual[data-fit="portrait"]::before,
.project__visual[data-fit="portrait"]::after { display: none; }
.project__visual[data-fit="portrait"] img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .7s var(--ease);
}
.project:hover .project__visual[data-fit="portrait"] img { transform: scale(1.03); }

/* Le monogramme VM a été retiré : la marque n'est plus que le nom */
.brand__mark { display: none; }
.brand { gap: 0; }
.footer__brand { display: none; }

/* Couverture « logo » : la marque du client, centrée, sur une surface neutre */
.project__visual[data-fit="logo"] {
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6%, 4rem);
}
.project__visual[data-fit="logo"]::before,
.project__visual[data-fit="logo"]::after { display: none; }
.project__visual[data-fit="logo"] img {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  /* Le logo officiel du musée ne fait que 291 px : au-delà de 145 px
     d'affichage il devient flou sur un écran retina. On le contient. */
  max-width: min(40%, 140px);
  max-height: 58%;
  object-fit: contain;
  transition: transform .7s var(--ease);
}
.project:hover .project__visual[data-fit="logo"] img { transform: scale(1.04); }
