/* Self-hosted fonts: no dependency on Google Fonts or rsms.me, which made
   text fall back to system fonts for clients when those servers were slow. */
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "InterDisplay";
  src: url("../assets/fonts/InterDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "InterDisplay";
  src: url("../assets/fonts/InterDisplay-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "InterDisplay";
  src: url("../assets/fonts/InterDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "InterDisplay";
  src: url("../assets/fonts/InterDisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --btn-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #0e0f10;
  --muted: #6f6f6f;
  --faint: #a6a6a6;
  --hover: #ececec;
  --line: #e7e7e7;
  --hover-strong: #d6d6d6;
  --ink-hover: #333333;
  --on-ink: #ffffff;
  --accent: #ff3503;
  --accent-hover: #e02f02;
}

:root[data-theme="dark"] {
  --btn-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.75), 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  --bg: #0e0f10;
  --surface: #1a1b1d;
  --ink: #f2f2f2;
  --muted: #9a9a9a;
  --faint: #6f6f6f;
  --hover: #26282b;
  --line: #26282b;
  --hover-strong: #3a3d40;
  --ink-hover: #d6d6d6;
  --on-ink: #0e0f10;
}

/* overflow-y: scroll keeps the scrollbar reserved so locking the body
   (when a project/writing overlay opens) doesn't shift the home. */
html { scroll-behavior: smooth; overflow-y: scroll; }

body {
  margin: 0;
  background: var(--bg);
  font-family: "InterDisplay", "Inter", system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--muted); }

button { font-family: "InterDisplay", "Inter", system-ui, sans-serif; }

.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; }

/* ---------- Layout ---------- */

.layout { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; }

.sidebar {
  width: 376px;
  max-width: 376px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 44px;
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

body.no-scroll { overflow: hidden; }

.main { max-width: 668px; box-sizing: border-box; padding: 44px; min-width: 520px; flex: 1; }

/* ---------- Contact card (shared) ---------- */

.contact-pop-head { display: flex; align-items: center; justify-content: space-between; }
.contact-pop-title { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; }
.contact-pop-close { border: none; background: none; cursor: pointer; color: var(--faint); font-size: 16px; line-height: 1; padding: 4px; }
.contact-pop-close:hover { color: var(--ink); }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-row-info { display: flex; flex-direction: column; gap: 4px; }
.contact-row-label { font-size: 12px; color: var(--faint); letter-spacing: -0.02em; }
.contact-row-value { font-size: 14px; font-weight: 500; letter-spacing: -0.02em; }
.contact-row-action { border: none; background: var(--hover); border-radius: 8px; padding: 8px; cursor: pointer; display: flex; color: var(--ink); }
.contact-row-action:hover { background: var(--hover-strong); }
.contact-copied { font-size: 12px; color: var(--muted); letter-spacing: -0.02em; }

/* ---------- Sidebar nav ---------- */

.km-menu { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.km-menu .spacer { flex: 1; }
.nav-group { display: flex; gap: 2px; }
.nav-item { position: relative; }
.nav-tip {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: #0e0f10;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 70;
  display: none;
}
.nav-item:hover .nav-tip { display: block; }
.nav-link {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
}
.nav-link:hover { background: var(--hover); color: var(--ink); }
/* The current section keeps its filled pill, not only on hover. */
.nav-link.active { background: var(--hover); color: var(--ink); }
.nav-link.active:hover { background: var(--hover-strong); }

/* Pushed to the right whether it sits in the top menu or the footer row. */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; background: var(--hover); border-radius: 9999px; padding: 3px; margin-left: auto; }
.lang-btn {
  border: none;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
  background: transparent;
  color: var(--muted);
}
.lang-btn.active { background: var(--surface); color: var(--ink); box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.08); }

/* ---------- Hero ---------- */

.hero { padding: 0 0 48px; display: flex; flex-direction: column; gap: 20px; }
.avatar { width: 80px; height: 80px; border-radius: 9999px; background: #ffffff; overflow: hidden; position: relative; }
.avatar img { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); width: 92%; height: auto; display: block; }
.hero-kicker { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; }
.hero-title { font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
.hero-sub { font-size: 14px; line-height: 1.6; letter-spacing: -0.02em; color: #a3a3a3; margin: 0; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 12px; margin-top: 8px; }

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9999px;
  border: none;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: var(--ink-hover); color: var(--on-ink); }

/* Contact keeps the brand accent, so it reads as the one action that matters.
   Scoped to the three contact triggers: the prev/next buttons stay neutral. */
#contact-open,
#pv-contact-toggle,
#wr-contact-toggle { background: var(--accent); color: #ffffff; }
#contact-open:hover,
#pv-contact-toggle:hover,
#wr-contact-toggle:hover { background: var(--accent-hover); color: #ffffff; }
.btn-secondary {
  padding: 9px 18px;
  border-radius: 9999px;
  border: none;
  background: var(--hover);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--hover-strong); color: var(--ink); text-decoration: none; }

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

.side-footer { margin-top: auto; padding-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.side-footer-row { display: flex; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }
.social-link { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.social-link:hover { background: var(--hover); color: var(--ink); }
.side-sep { width: 24px; height: 1px; background: var(--line); }
/* Social links sit on the left, copyright on the right, one shared line. */
.side-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.side-copy { display: flex; flex-direction: column; gap: 2px; text-align: right; }
/* The one place that stays on plain Inter Regular. */
.side-copy span {
  font-size: 12px;
  color: #a3a3a3;
  letter-spacing: -0.02em;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
}
.nav-label { display: none; }

/* ---------- Projects (home) ---------- */

.projects { display: flex; flex-direction: column; gap: 64px; padding-bottom: 48px; }
.project-card { display: flex; flex-direction: column; gap: 16px; }
.media-frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.06);
}
.media-frame video,
.media-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--hover);
}
.like-btn {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 4px;
  border: none;
  border-radius: 9999px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.like-btn svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); }
.like-btn:hover { transform: scale(1.06); }

.heart-float {
  position: absolute;
  pointer-events: none;
  z-index: 30;
  animation: heart-fly 0.9s ease-out forwards;
}
@keyframes heart-fly {
  0% { opacity: 0.95; transform: translate(-50%, 0) scale(0.7); }
  30% { opacity: 1; transform: translate(-50%, -28px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -110px) scale(1.35); }
}
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 8px; }
.project-titles { display: flex; gap: 12px; align-items: center; flex-wrap: nowrap; min-width: 0; }
.project-name { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.project-sep { width: 1px; height: 14px; background: var(--hover-strong); flex-shrink: 0; }
.project-desc {
  font-size: 13px;
  color: #a3a3a3;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-open {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9999px;
  background: var(--hover);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.project-open:hover { background: var(--hover-strong); color: var(--ink); text-decoration: none; }

/* ---------- Project detail (overlay above the blurred home) ---------- */

#view-project,
#view-writing {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow-y: auto;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.3s ease;
}
#view-project.open,
#view-writing.open { opacity: 1; }
.project-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 668px;
  margin: 0 auto;
  padding: 44px 44px 64px;
  box-sizing: border-box;
  transform: scale(0.94);
  opacity: 0;
  transform-origin: center top;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
#view-project.open .project-view,
#view-writing.open .project-view {
  transform: scale(1);
  opacity: 1;
}

.wr-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.wr-body { display: flex; flex-direction: column; gap: 14px; padding: 0 4px; }
.wr-body p { font-size: 14px; line-height: 1.7; letter-spacing: -0.02em; margin: 0; text-wrap: pretty; }
.project-nav button span {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.pv-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  min-height: 40px;
  z-index: 50;
}
.pv-topbar .btn-secondary { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.pv-contact { position: absolute; top: 0; right: 0; }
.pv-contact-toggle {
  font-size: 13px;
  transition: opacity 0.15s ease;
}
.pv-contact.open .pv-contact-toggle,
.sc-contact.open .btn-primary {
  opacity: 0;
  pointer-events: none;
}
.sc-contact { position: relative; }
.sc-contact .btn-primary { transition: opacity 0.15s ease; }

/* The card continues the black button: dark background, light content. */
.contact-card {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  box-sizing: border-box;
  background: var(--accent);
  color: #ffffff;
  border-radius: 16px;
  box-shadow: var(--btn-shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: scale(0.12);
  transform-origin: top right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  pointer-events: none;
  cursor: pointer;
  z-index: 60;
}
.contact-card.sc-card {
  left: 0;
  right: auto;
  width: 288px;
  transform-origin: top left;
}
.pv-contact.open .contact-card,
.sc-contact.open .contact-card {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
/* White is pinned rather than using --on-ink: the accent does not flip with
   the theme, so the content must not either. Opacities are kept high because
   white on the accent has less headroom than white on ink. */
.contact-card .contact-pop-title { color: #ffffff; opacity: 0.8; }
.contact-card .contact-pop-close { color: #ffffff; opacity: 0.75; }
.contact-card .contact-pop-close:hover { color: #ffffff; opacity: 1; }
.contact-card .contact-row-label { color: #ffffff; opacity: 0.75; }
.contact-card .contact-row-value { color: #ffffff; }
.contact-card .contact-row-action {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
}
.contact-card .contact-row-action:hover {
  background: rgba(255, 255, 255, 0.32);
}
.contact-card .contact-copied { color: #ffffff; opacity: 0.85; }
.pv-title { font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; margin: 0; padding: 0 4px; }
.project-about { display: flex; flex-direction: column; padding: 0 4px; }
.section-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.project-about p { font-size: 14px; line-height: 1.65; letter-spacing: -0.02em; margin: 0; text-wrap: pretty; }
.gallery { display: flex; flex-direction: column; gap: 16px; }
.gallery-item img, .gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: var(--hover);
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.06);
}
.project-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; }
.project-nav .btn-secondary, .project-nav .btn-primary { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.project-nav .btn-primary { font-weight: 600; }

/* ---------- About ---------- */

.about {
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.about-col { display: flex; flex-direction: column; }
.about-text { display: flex; flex-direction: column; gap: 14px; }
.about-text p { font-size: 14px; line-height: 1.65; letter-spacing: -0.02em; margin: 0; text-wrap: pretty; }
.about-text p.muted { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--hover);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---------- Pricing ---------- */

.pricing { padding-bottom: 48px; padding-top: 48px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 40px; }
.pricing-head { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.pricing-title { font-size: 32px; letter-spacing: -0.01em; margin: 0; }
.pricing-sub { font-size: 14px; color: var(--muted); letter-spacing: -0.02em; margin: 0; line-height: 1.6; }
/* Full-width rows: details on the left, price and CTA on the right. */
.offers-grid { display: flex; flex-direction: column; gap: 16px; }

.offer-card {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 16px;
  padding: 28px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.offer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.offer-name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.offer-sub { font-size: 13px; color: var(--on-ink); opacity: 0.6; letter-spacing: -0.02em; line-height: 1.6; text-wrap: pretty; }
.offer-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  font-size: 12.5px;
  color: var(--on-ink);
  opacity: 0.8;
  letter-spacing: -0.02em;
}
.offer-list li { display: flex; align-items: flex-start; gap: 9px; line-height: 1.45; }
.offer-list li::before { content: "\2713"; font-size: 11px; opacity: 0.5; flex-shrink: 0; }
.offer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
}
.offer-price { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
.offer-delay { font-size: 12px; color: var(--on-ink); opacity: 0.55; letter-spacing: -0.02em; }
.offer-cta {
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 9999px;
  border: none;
  background: var(--on-ink);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  white-space: nowrap;
}
.offer-cta:hover { opacity: 0.9; }

.pv-pricing { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 20px; }

/* ---------- Writings ---------- */

.writings { padding-bottom: 48px; display: flex; flex-direction: column; padding-top: 48px; border-top: 1px solid var(--line); }
.writings-list { display: flex; flex-direction: column; }
.writing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  margin: 0 -20px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.writing-row:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.writing-title { font-size: 14px; letter-spacing: -0.02em; line-height: 1.45; text-align: left; }
.writing-date { font-size: 13px; color: var(--faint); letter-spacing: -0.02em; flex-shrink: 0; text-align: right; }
.writings-more {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  width: fit-content;
}
.writings-more:hover { color: var(--muted); text-decoration: none; }

/* ---------- Writings list page ---------- */

.ecrits-page { max-width: 700px; margin: 0 auto; padding: 44px 32px; box-sizing: border-box; }
.ecrits-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.ecrits-page-title { font-size: 44px; letter-spacing: -0.01em; margin: 44px 0 24px; }

/* Breathing room above a section when the page scrolls to it, so it never
   sits flush against the top of the window. */
#travaux, #tarifs, #apropos, #ecrits { scroll-margin-top: 44px; }

/* ---------- Text reveal (blur-in, staggered) ---------- */

/* Words stay whole so a title never breaks mid-word between two letters. */
.reveal-w { display: inline-block; white-space: nowrap; }
.reveal-unit {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  will-change: opacity, filter, transform;
}
.reveal-letters .reveal-unit {
  filter: blur(12px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.4, 0.25, 1),
              filter 0.6s cubic-bezier(0.25, 0.4, 0.25, 1),
              transform 0.6s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.reveal-words .reveal-unit {
  filter: blur(8px);
  transition: opacity 0.4s cubic-bezier(0.25, 0.4, 0.25, 1),
              filter 0.4s cubic-bezier(0.25, 0.4, 0.25, 1),
              transform 0.4s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.reveal-unit.in { opacity: 1; filter: blur(0px); transform: none; }

/* Plain opacity fade for whole blocks — no splitting, so article copy can
   grow freely without any markup work. */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.reveal-fade.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .reveal-unit, .reveal-fade {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  /* The sidebar stops being a column: its parts become siblings of main so
     the footer can sit at the very end instead of splitting hero and work. */
  .sidebar { display: contents; }
  .hero { order: 1; width: 100%; box-sizing: border-box; padding: 28px 20px 72px; }
  .main { order: 2; width: 100%; min-width: 0; max-width: none; padding: 0 20px; }
  .side-footer { order: 3; width: 100%; box-sizing: border-box; padding: 8px 20px 150px; margin-top: 0; }

  /* Frosted-glass bar with written labels instead of icons. */
  .km-menu {
    order: 4;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    box-shadow: 0px 18px 40px -12px rgba(0, 0, 0, 0.28);
    background: rgba(18, 19, 21, 0.62);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    padding: 6px;
    margin-bottom: 0;
    width: auto;
  }
  .nav-group { gap: 2px; }
  .nav-link svg { display: none; }
  .nav-label { display: block; }
  .nav-link {
    width: auto;
    height: auto;
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.62);
  }
  .nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }
  /* The current section keeps a visible pill so you can see where you are. */
  .nav-link.active,
  .nav-link.active:hover { color: #ffffff; background: rgba(255, 255, 255, 0.18); }
  .nav-tip { display: none !important; }

  /* Settings on the left, language on the right. */
  .side-footer .side-footer-row { align-items: center; }

  /* Contact button detaches from the hero and docks above the menu. */
  .sc-contact.docked {
    position: fixed;
    left: 50%;
    bottom: 86px;
    transform: translateX(-50%);
    z-index: 85;
    animation: dock-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  @keyframes dock-in {
    from { opacity: 0; transform: translateX(-50%) translateY(14px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
  .sc-contact.docked .btn-primary { box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
  /* Card grows upward from the docked button, centered on screen. */
  .sc-contact.docked .contact-card {
    top: auto;
    bottom: 0;
    left: 50%;
    right: auto;
    width: min(320px, calc(100vw - 32px));
    transform-origin: bottom center;
    transform: translateX(-50%) scale(0.12);
  }
  .sc-contact.docked.open .contact-card { transform: translateX(-50%) scale(1); }

  .about { grid-template-columns: 1fr; }
  /* Offer rows stack: price and CTA move under the details. */
  .offer-card { flex-direction: column; gap: 20px; padding: 24px; }
  .offer-list { grid-template-columns: 1fr; gap: 8px; }
  .offer-side { align-items: flex-start; text-align: left; width: 100%; }
  .offer-cta { margin-top: 14px; width: 100%; }
  .offer-price { font-size: 30px; }

  /* Let the project caption breathe instead of clipping to a few characters. */
  /* Name, description and button all hold one line; the description takes
     the leftover space and truncates. */
  .project-meta { flex-wrap: nowrap; gap: 10px; padding: 0 4px; }
  .project-titles { flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; }

  /* Prev/next share the row and truncate instead of running off-screen. */
  .project-nav { gap: 10px; }
  .project-nav .btn-secondary,
  .project-nav .btn-primary {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 10px 14px;
  }
  .project-nav button span { max-width: 100%; }

  #travaux, #tarifs, #apropos, #ecrits { scroll-margin-top: 24px; }
  .side-bottom { flex-wrap: wrap; }

  /* Roomier hero buttons: easier to tap, better balance on a narrow screen. */
  .hero-ctas { gap: 10px; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary {
    padding: 13px 22px;
    font-size: 15px;
  }
  .project-view { padding: 24px 20px 64px; }
  .ecrits-page { padding: 28px 20px 120px; }
  .ecrits-page-title { font-size: 34px; margin: 32px 0 20px; }
}
