/* ==========================================================
   Portfolio d'Emilie Dumont, V2
   Thèmes via variables CSS : data-theme="dark" | "light"
   ========================================================== */

:root {
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0A1226;
  --card: #0F1B38;
  --card-2: #172A55;
  --art-bg: #0C1730;
  --line: #1F2A4A;
  --line-2: #2A3961;
  --text: #ECE8DE;
  --dim: #A3AECB;
  --faint: #8E9BC2;
  --accent: #5B9BFF;
  --on-accent: #0A1226;
  --ok: #5BD68A;
  --ok-bg: #123B2C;
  --ok-text: #7BE0A6;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #EDE8DD;
  --card: #FAF7F0;
  --card-2: #DCE5F8;
  --art-bg: #DFE7F7;
  --line: #CFC8B8;
  --line-2: #B4BEDB;
  --text: #14203F;
  --dim: #4A5578;
  --faint: #56618A;
  --accent: #1F5FD0;
  --on-accent: #FFFFFF;
  --ok: #1E9E57;
  --ok-bg: #DDF3E6;
  --ok-text: #14703F;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.03rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }

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

/* Fondu doux lors du changement de thème */
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, fill 0.35s ease, stroke 0.35s ease !important;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

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

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.skip:focus { top: 16px; }

/* Barre de progression de lecture */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  height: 3px;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}
.brand__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px 22px;
  font-size: 14px;
  color: var(--dim);
}
.nav__link {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--text); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }

.theme-toggle, .menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover, .menu-btn:hover { border-color: var(--accent); }
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun { display: none; }

.menu-btn { display: none; }
.menu-btn__bars { position: relative; width: 16px; height: 10px; }
.menu-btn__bars span {
  position: absolute; left: 0; right: 0;
  height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.menu-btn__bars span:nth-child(1) { top: 0; }
.menu-btn__bars span:nth-child(2) { top: 8px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:nth-child(1) { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:nth-child(2) { top: 4px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .js .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px clamp(16px, 3vw, 40px) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .js .nav.open { display: flex; }
  .js .nav__link { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .js .nav__link::after { display: none; }
  .js .nav .theme-toggle { align-self: flex-start; margin: 8px 0; }
  .js .nav .btn { align-self: flex-start; }
  .nav { flex-wrap: wrap; }
}

/* ---------- Boutons, pastilles ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s var(--ease), background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { opacity: 0.9; }
.btn--ghost { border-color: var(--line-2); color: var(--text); font-weight: 500; }
.btn--ghost:hover { border-color: var(--accent); }
.btn--dark { background: var(--on-accent); color: var(--accent); }
.btn--dark:disabled { opacity: 0.6; cursor: wait; transform: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 16px;
  border-radius: 999px;
  background: var(--text);
  font-size: clamp(15px, 1.3vw, 17px);
  font-weight: 600;
  color: var(--bg);
}
.pill .dot-ok { background: var(--accent); }
[data-theme="light"] .pill .dot-ok { background: #7FB0FF; }

.dot-ok {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(3.2); opacity: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--line);
}
.hero__bg svg {
  position: absolute;
  top: -120px;
  right: -260px;
  width: min(980px, 110vw);
  height: auto;
  transform: translate(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 16px));
  transition: transform 0.4s ease-out;
}
.hero__bg circle { stroke: currentColor; stroke-width: 1.2; }
.hero__bg .ring-dash { stroke-dasharray: 3 9; transform-origin: 400px 400px; animation: spin 90s linear infinite; }
.hero__bg .ring-dot { fill: var(--accent); stroke: none; transform-origin: 400px 400px; animation: spin 36s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__in {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 56px 40px;
  padding-top: clamp(28px, 4.5vw, 60px);
  padding-bottom: clamp(56px, 7vw, 104px);
}
.hero__main { flex: 1 1 560px; min-width: 0; }
.hero__aside {
  position: relative;
  flex: 0 1 340px;
  min-width: 260px;
  align-self: flex-end;
}

.hero__title {
  margin: 22px 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(68px, 10.5vw, 156px);
  line-height: 0.88;
  letter-spacing: -0.025em;
}
.hero__title .line { display: block; overflow: hidden; padding: 0.04em 0.08em 0.08em 0; margin-bottom: -0.04em; }
.hero__title .word { display: inline-block; }
.hero__title em { color: var(--accent); }

.hero__role {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
}
.hero__sub {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--faint);
}
.hero__pitch {
  max-width: 36em;
  margin-top: 36px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 25px);
  line-height: 1.3;
  color: var(--text);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.idcard {
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: var(--accent);
  color: var(--on-accent);
}
.idcard dl > div {
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent);
}
.idcard dl > div:first-child { padding-top: 0; }
.idcard dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.idcard dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}
.idcard dd {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.12;
}

.badge {
  position: absolute;
  right: -22px;
  top: -60px;
  width: 116px; height: 116px;
  transition: transform 0.3s var(--ease);
}
.badge:hover { transform: scale(1.06) rotate(-6deg); }
.badge svg { display: block; width: 100%; height: 100%; }
.badge__bg { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; }
.badge__ring { transform-origin: 60px 60px; animation: spin 24s linear infinite; }
.badge text { font-family: var(--mono); font-size: 9.6px; font-weight: 500; fill: var(--text); }
.badge__core { fill: var(--accent); }
.badge__arrow { fill: none; stroke: var(--on-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 700px) {
  .badge { right: 12px; top: -58px; }
  .hero__aside { flex-basis: 100%; margin-top: 24px; }
}

/* Entrée du hero (uniquement si le visiteur accepte les animations) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .word {
    transform: translateY(115%);
    animation: rise 1s var(--ease) forwards;
    animation-delay: calc(var(--i) * 0.14s + 0.1s);
  }
  .js .hero__in-item {
    opacity: 0;
    transform: translateY(18px);
    animation: fade-up 0.8s var(--ease) forwards;
    animation-delay: calc(var(--d) * 0.1s + 0.15s);
  }
}
@keyframes rise { to { transform: translateY(0); } }
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* ---------- Bandeau de technologies ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; align-items: center; gap: 36px; padding-right: 36px; }
.marquee li {
  font-family: var(--serif);
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1;
  white-space: nowrap;
}
.marquee li.o { color: transparent; -webkit-text-stroke: 1.2px var(--dim); }
.marquee li.sep {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { width: auto; animation: none; flex-wrap: wrap; justify-content: center; }
  .marquee .dup { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; }
  .hero__bg .ring-dash, .hero__bg .ring-dot, .badge__ring { animation: none; }
  .pulse::after { animation: none; }
}

/* ---------- Cartes et grilles ---------- */
.card {
  min-width: 0;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.card--wide { flex: 2 1 560px !important; }
.card--outline { border-color: var(--accent); }

.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.cards > .card { flex: 1 1 280px; }

.section { padding-top: clamp(72px, 9vw, 120px); }
.title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.title__count {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--accent);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.card__yr {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}
.card h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.15;
}
article.card > p:not(.card__yr),
.tl__card > p { color: var(--dim); font-size: 15px; }

.cards > article.card:not(.project) { transition: border-color 0.25s ease, transform 0.25s var(--ease); }
.cards > article.card:not(.project):hover { border-color: var(--line-2); transform: translateY(-3px); }
.cards > article.card--outline:hover { border-color: var(--accent); }

/* ---------- Profil ---------- */
.profil {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
}
.profil .eyebrow { flex: 0 0 140px; padding-top: 14px; }
.profil__body { flex: 1 1 520px; min-width: 0; }
.profil__text {
  max-width: 28em;
  margin-bottom: 36px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.18;
}
.profil__text strong { font-weight: 400; font-style: italic; color: var(--accent); }
.profil__cols { display: flex; flex-wrap: wrap; gap: 16px; }
.profil__cols > .card { flex: 1 1 260px; }
.profil__cols > .card:first-child { flex: 2 1 380px; }
.label-serif {
  margin-bottom: 16px !important;
  font-style: italic;
  font-size: 24px !important;
  color: var(--accent);
}
.langs { display: flex; flex-direction: column; gap: 10px; }
.langs li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.langs li:last-child { border-bottom: 0; padding-bottom: 0; }
.langs span { color: var(--dim); }

/* ---------- Puces ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 3px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.chips--solid li {
  padding: 5px 14px;
  border: 0;
  background: var(--card-2);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.chips--solid li:hover { background: var(--accent); color: var(--on-accent); }
.chips--lg { gap: 10px; }
.chips--lg li {
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* ---------- Projets ---------- */
.project {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.3s var(--ease);
}
.cards--projects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.cards--projects > .project { grid-column: span 12; }
@media (min-width: 900px) {
  .cards--projects > .project:nth-child(1),
  .cards--projects > .project:nth-child(4),
  .cards--projects > .project:nth-child(5) { grid-column: span 7; }
  .cards--projects > .project:nth-child(2),
  .cards--projects > .project:nth-child(3),
  .cards--projects > .project:nth-child(6) { grid-column: span 5; }
}
.project:hover { border-color: var(--accent); transform: translateY(-4px); }
.project:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

.project__art {
  height: 150px;
  background: var(--art-bg);
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}
.project__art svg { display: block; width: 100%; height: 100%; }
.project__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 24px 28px 28px;
}
.project__body > * { margin: 0; }
.project h3 { font-size: 34px; line-height: 1.05; }
.project p:not(.card__yr) { color: var(--dim); font-size: 15px; }
.project__top { display: flex; align-items: center; justify-content: space-between; }
.project__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
}
.tag-ok {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-size: 12.5px;
  font-weight: 500;
}
.link {
  margin-top: auto;
  align-self: flex-start;
  padding-top: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}
.link::after { content: ""; position: absolute; inset: 0; }
.link .arr { display: inline-block; transition: transform 0.25s var(--ease); }
.project:hover .arr { transform: translateX(5px); }
.private {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

/* Illustrations des cartes de projets (décoratives) */
.art-line { stroke: var(--line-2); }
.art-route { stroke: var(--accent); }
.art-node circle { fill: var(--accent); }
.art-end circle { fill: var(--art-bg); stroke: var(--accent); stroke-width: 2.2; }
.art-ring { stroke: var(--accent); }
.art-ring--dim { stroke: var(--line-2); }
.art-fill { fill: var(--accent); }
.art-check { fill: var(--accent); }
.art-box { stroke: var(--line-2); }
.art-tick { stroke: var(--on-accent); }
.art-page { fill: var(--card-2); stroke: var(--line-2); stroke-width: 1.5; }
.art-page--front { fill: var(--card); }
.art-bubble { fill: var(--card-2); stroke: var(--line-2); stroke-width: 1.5; }
.art-q { font-family: var(--serif); font-size: 44px; fill: var(--on-accent); }

/* ---------- Frise du parcours ---------- */
.timeline { position: relative; }
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 34px; bottom: 34px;
  left: 179px;
  width: 2px;
  background: var(--line);
}
.timeline::after {
  background: var(--accent);
  transform: scaleY(var(--p, 0));
  transform-origin: top;
}
.tl {
  display: grid;
  grid-template-columns: 150px 28px minmax(0, 1fr);
  grid-template-areas: "yr dot card";
  column-gap: 16px;
  padding-bottom: 16px;
}
.tl:last-child { padding-bottom: 0; }
.tl__yr {
  grid-area: yr;
  padding-top: 26px;
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  transition: color 0.3s ease;
}
.tl.on .tl__yr { color: var(--accent); }
.tl__dot {
  grid-area: dot;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 14px; height: 14px;
  margin-top: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-2);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}
.tl.on .tl__dot { background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
.tl__card { grid-area: card; }

@media (max-width: 640px) {
  .timeline::before, .timeline::after { left: 13px; }
  .tl {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas: "dot yr" "dot card";
    row-gap: 6px;
  }
  .tl__yr { padding-top: 0; text-align: left; }
  .tl__dot { margin-top: 4px; }
}

/* ---------- Compétences ---------- */
.skills { padding-top: 12px; padding-bottom: 12px; border-radius: 28px; }
.skills__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.skills__row:last-child { border-bottom: 0; }
.skills dt {
  flex: 0 0 180px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--accent);
}
.skills dd { flex: 1 1 300px; min-width: 0; }

/* ---------- Contact ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid var(--line-2);
  border-radius: 32px;
  background: var(--card);
}
.contact__intro { flex: 1 1 360px; min-width: 0; }
.contact h2 {
  margin-bottom: 36px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 6.4vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.contact h2 em { color: var(--accent); }
.contact__links { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.contact__links li { border-bottom: 1px solid var(--line-2); }
.contact__links a {
  display: flex; align-items: baseline; gap: 16px; padding: 18px 4px;
  transition: padding 0.3s var(--ease), color 0.2s ease;
}
.contact__links a:hover { padding-left: 14px; color: var(--accent); }
.contact__links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact__k { flex: 0 0 76px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.contact__v { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 18px; font-weight: 500; }
.contact__links .arr { display: inline-block; color: var(--accent); transition: transform 0.25s var(--ease); }
.contact__links a:hover .arr { transform: translateX(5px); }

.contact__form { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; font-size: 14px; color: var(--dim); }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--art-bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease;
}
.field input:hover,
.field textarea:hover { border-color: var(--faint); }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 140px; }
.field [aria-invalid="true"] { border-color: #E5655C; }
.contact__form .btn { align-self: flex-start; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-status { min-height: 1.6em; margin: 0; font-weight: 500; }

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

/* ---------- Pied de page ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 72px;
  padding-bottom: 40px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
}
.site-footer a:hover { color: var(--accent); }

/* ---------- Apparition au scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .project, .cards > article.card { transition: none; }
}

/* ---------- Impression (CV papier ou PDF) ---------- */
@media print {
  .site-header, .progress, .hero__bg, .badge, .marquee, .contact__form, .copy, .copy-status, .site-footer a { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  .reveal, .hero__in-item, .word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .card, .idcard, .contact { background: #fff !important; color: #000 !important; border: 1px solid #999 !important; break-inside: avoid; }
  .section { padding-top: 32px; }
}

/* ---------- Filtres de projets ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.filters__label { margin-right: 6px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.filter:hover { border-color: var(--accent); transform: translateY(-2px); }
.filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.filter__n { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.filter.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter.is-on .filter__n { color: inherit; opacity: 0.75; }
.project[hidden] { display: none; }
.cards--projects.is-filtered > .project:nth-child(n) { grid-column: span 12; }
@media (min-width: 900px) {
  .cards--projects.is-filtered > .project:nth-child(n) { grid-column: span 6; }
}
.cards--projects.is-filtered > .project.is-last-odd:nth-child(n) { grid-column: span 12; }
@media (prefers-reduced-motion: no-preference) {
  .project.pop { animation: pop 0.5s var(--ease) both; }
  @keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

  /* Tilt 3D au survol (la valeur --tilt est calculée en JS) */
  .js .reveal.in.project.tilting {
    transform: var(--tilt, none);
    transition: border-color 0.25s ease, transform 0.12s linear;
    will-change: transform;
  }
  /* L'illustration se redessine et grossit un peu au survol */
  .project__art svg { transition: transform 0.5s var(--ease); }
  .project:hover .project__art svg { transform: scale(1.07); }
  .project:hover .art-route { stroke-dasharray: 1000; animation: draw 1.2s var(--ease) both; }
  .project:hover .art-fill, .project:hover .art-check { animation: beat 0.9s var(--ease); transform-box: fill-box; transform-origin: center; }
  @keyframes draw { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
  @keyframes beat { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
}

/* ---------- À toi de jouer : mini to-do ---------- */
.play {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 16px; padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line-2); border-radius: 24px; background: var(--card); overflow: hidden;
}
@media (min-width: 900px) { .play { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 56px; } }
.play__intro > * { margin: 0; }
.play__intro .eyebrow { margin-bottom: 14px; }
.play__intro h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; margin-bottom: 16px; }
.play__intro p:not(.eyebrow) { color: var(--dim); max-width: 32em; }

.todo { position: relative; padding: 20px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--art-bg); }
.todo__form { display: flex; gap: 10px; margin-bottom: 14px; }
.todo__form input {
  flex: 1; min-width: 0; padding: 11px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--text); font: inherit; font-size: 15px;
}
.todo__form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.todo__list { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.todo__item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card);
}
.todo__item label { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.todo__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.todo__box {
  position: relative; flex: none; width: 24px; height: 24px; border: 2px solid var(--line-2); border-radius: 7px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease);
}
.todo__box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0);
  transition: transform 0.25s var(--ease);
}
.todo__item input:checked + .todo__box { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.todo__item input:checked + .todo__box::after { transform: rotate(45deg) scale(1); }
.todo__item input:focus-visible + .todo__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.todo__text { overflow-wrap: anywhere; transition: color 0.2s ease; }
.todo__item input:checked ~ .todo__text { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--accent); }
.todo__del {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--faint);
  font-size: 20px; line-height: 1; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease;
}
.todo__del:hover { background: var(--card-2); color: var(--text); }
.todo__del:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.todo__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.todo__clear { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.todo__win {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 0; padding: 14px 16px;
  border-radius: 12px; background: var(--ok-bg); color: var(--ok-text); font-weight: 500;
}
.todo__win[hidden] { display: none; }
.todo__empty { padding: 14px 4px; color: var(--faint); font-size: 14px; }
.confetti { position: absolute; left: 50%; top: 40%; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .todo__item.enter { animation: pop 0.4s var(--ease) both; }
  .todo__win:not([hidden]) { animation: pop 0.5s var(--ease) both; }
  .confetti { animation: burst 1.1s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
  @keyframes burst {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
  }
}

@media (max-width: 520px) {
  .contact__links a { flex-wrap: wrap; gap: 4px 12px; }
  .contact__k { flex-basis: 100%; }
  .contact__v { font-size: 17px; overflow-wrap: normal; }
}

/* Thème clair : le bloc contact reste sombre pour ancrer la fin de page */
[data-theme="light"] .contact {
  --card: #0F1B38;
  --art-bg: #0C1730;
  --line: #1F2A4A;
  --line-2: #2A3961;
  --text: #ECE8DE;
  --dim: #A3AECB;
  --faint: #8E9BC2;
  --accent: #5B9BFF;
  --on-accent: #0A1226;
  color: var(--text);
}
.pill .dot-ok::after { background: var(--accent); }
[data-theme="light"] .pill .dot-ok::after { background: #7FB0FF; }
