/*
 * Page portfolio. Volontairement différente des quatre sites qu'elle
 * présente : fond d'encre, titres en Archivo étiré, étiquettes en chasse
 * fixe, accent vert acide. Aucun framework, aucune dépendance.
 */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-latin.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-500.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --surface: #15181d;
  --ink: #eef0f3;
  --muted: #a7adb8;
  --rule: #2a2f38;
  --lime: #c8f542;
  --on-lime: #10140a;
  /* Texte d'accent : le vert acide en sombre, un vert profond en clair. */
  --accent-text: #c8f542;
  --frame: #20242b;
  --font-display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #f3f4f6;
    --surface: #ffffff;
    --ink: #0d0f12;
    --muted: #4b5260;
    --rule: #d3d7de;
    --accent-text: #3d5c00;
    --frame: #0d0f12;
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #0d0f12;
  --muted: #4b5260;
  --rule: #d3d7de;
  --accent-text: #3d5c00;
  --frame: #0d0f12;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
}

.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--lime);
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.button:hover { transform: translateY(-2px); }
.button.is-inverted { border-color: var(--on-lime); background: var(--on-lime); color: var(--lime); }
.button.is-ghost { border-color: var(--on-lime); background: transparent; color: var(--on-lime); }
.button.is-ghost:hover { background: var(--on-lime); color: var(--lime); }

/* ── Barre du haut ─────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.identity { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; font-weight: 700; }

.identity-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--lime);
  color: var(--on-lime);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 0.95rem;
}

.topbar-tools { display: flex; align-items: center; gap: 0.5rem; }

.lang-switch { display: flex; border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem; }

.lang-switch button {
  min-width: 2.75rem;
  min-height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 0.8125rem var(--font-mono);
  cursor: pointer;
}

.lang-switch button[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

.icon-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover { background: var(--surface); }
.icon-button svg { width: 1.35rem; height: 1.35rem; }

@media (max-width: 40rem) {
  /* Le nom reste lisible par les lecteurs d'écran : il sert de libellé au lien. */
  .identity-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar .button { padding-inline: 0.9rem; font-size: 0.9375rem; }
}

/* ── Introduction ──────────────────────────────────────────────────── */
.hero { padding: clamp(3rem, 9vw, 7.5rem) var(--gutter) clamp(3rem, 7vw, 5.5rem); }

.hero h1 {
  max-width: 17ch;
  margin-block: 1.25rem 2rem;
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: clamp(2.4rem, 7.2vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero h1 em { font-style: normal; color: var(--accent-text); }

.intro { max-width: 62ch; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rule);
}

.facts div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.25rem;
  padding: 1.5rem 1.5rem 0 0;
}

.facts div + div { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.facts dd { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1; }
.facts dt { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 48rem) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n + 3) { margin-top: 1.5rem; border-top: 1px solid var(--rule); }
}

/* ── Réalisations ──────────────────────────────────────────────────── */
.section-title {
  padding: 0 var(--gutter) 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  border-top: 1px solid var(--rule);
}

.project:nth-of-type(even) .project-visual { order: 2; }

.project-visual { position: relative; padding: 0 0 8% 0; }
.project:nth-of-type(even) .project-visual { padding-left: 6%; }
.project:nth-of-type(odd) .project-visual { padding-right: 6%; }

.frame-browser {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 0.9rem;
  background: var(--frame);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.frame-bar { display: flex; gap: 0.4rem; padding: 0.7rem 0.9rem; }
.frame-bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #4a515c; }
.frame-browser img { width: 100%; }

.frame-phone {
  position: absolute;
  bottom: 0;
  width: 24%;
  overflow: hidden;
  border: 0.4rem solid var(--frame);
  border-radius: 1.6rem;
  background: var(--frame);
  box-shadow: 0 24px 48px -20px rgb(0 0 0 / 0.7), 0 0 0 1px var(--rule);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project:nth-of-type(odd) .frame-phone { right: 0; }
.project:nth-of-type(even) .frame-phone { left: 0; }
.frame-phone img { width: 100%; border-radius: 1.2rem; }

.project:hover .frame-browser { transform: translateY(-6px); }
.project:hover .frame-phone { transform: translateY(-12px); }

.project-index {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--muted);
}

.project-text .label { margin-top: 1.25rem; }

.project-text h3 {
  margin-block: 0.4rem 1.25rem;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tags li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.highlights { display: grid; gap: 0.75rem; margin-block: 1.75rem 2rem; }

.highlights li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--muted);
}

.highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--lime);
  border-radius: 2px;
}

@media (max-width: 60rem) {
  .project { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project-visual { order: 0; }
}

/* ── Ce que chaque site contient ───────────────────────────────────── */
.included { padding: clamp(3rem, 7vw, 6rem) 0; border-top: 1px solid var(--rule); }

.included ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 1rem var(--gutter) 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.included li {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.25s ease;
}

.included li:hover { background: var(--surface); }
.included strong { font-family: var(--font-display); font-stretch: 112%; font-size: 1.25rem; line-height: 1.15; }
.included span { color: var(--muted); font-size: 0.9875rem; }

@media (max-width: 64rem) { .included ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36rem) { .included ul { grid-template-columns: 1fr; } }

/* ── Contact ───────────────────────────────────────────────────────── */
.contact {
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter) 3rem;
  background: var(--lime);
  color: var(--on-lime);
}

.contact h2 {
  max-width: 14ch;
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.contact > p { max-width: 52ch; margin-top: 1.5rem; font-size: 1.2rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.contact .button { min-height: 3.4rem; padding-inline: 1.75rem; font-size: 1.125rem; }
.contact :focus-visible { outline-color: var(--on-lime); box-shadow: 0 0 0 6px var(--lime); }

.colophon {
  margin-top: clamp(3rem, 7vw, 5rem) !important;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(16 20 10 / 0.35);
  font-family: var(--font-mono);
  font-size: 0.8125rem !important;
  max-width: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
