/* ==========================================================================
   Portfolio — style.css
   Charte : warm minimal, Space Grotesk + Inter Tight + JetBrains Mono.
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --fg: #0a0a0a;
  --fg-soft: #404040;
  --muted: #525252;
  --muted-2: #737373;
  --muted-3: #a8a29e;
  --line: rgba(0,0,0,0.08);
  --line-soft: rgba(0,0,0,0.06);
  --line-strong: rgba(0,0,0,0.12);
  --card: #ffffff;
  --paper: #fafaf9;
  --paper-2: #f5f5f4;
  --accent: #0a0a0a;
  --danger-bg: #2a1a1c;
  --danger-fg: #ffd0d4;
  --danger-line: #5b2a30;

  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font-family: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 4px;
}

.muted { color: var(--muted-2); }
.small { font-size: 12px; }
.alert {
  background: var(--danger-bg); color: var(--danger-fg);
  border: 1px solid var(--danger-line);
  padding: 10px 12px; border-radius: 8px; margin-bottom: 12px;
}

/* ── Eyebrow + sections-labels (mono uppercase) ─────────────────── */
.hero-eyebrow,
.apps-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-3);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.008em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 180ms ease,
              background 200ms ease,
              color 200ms ease,
              border-color 200ms ease,
              box-shadow 220ms ease;
}
.btn-primary {
  background: #0a0a0a; color: #fafaf9; border-color: #0a0a0a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.32), 0 2px 4px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-secondary {
  background: var(--card); color: var(--fg); border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--paper);
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.btn-secondary:active { transform: translateY(0); box-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--muted); border-color: transparent;
}
.btn-ghost:hover { color: var(--fg); background: var(--paper); }
.link-muted {
  color: var(--muted-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.link-muted:hover { color: var(--fg); }

/* ── Topbar (fixed, glass) ───────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 22px 36px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(251,250,247,0.85), rgba(251,250,247,0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
  mask-image: linear-gradient(to bottom, black 60%, transparent);
}
.brand {
  pointer-events: auto;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  background: transparent; border: 0; padding: 0; cursor: pointer;
}
.brand .dot { color: var(--muted-3); }
.brand-stack { font-size: 22px; }
.topbar-nav {
  display: flex; gap: 28px;
  pointer-events: auto;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  letter-spacing: -0.005em;
}
.topbar-nav a {
  color: var(--muted-2); text-decoration: none;
  transition: color 150ms ease;
}
.topbar-nav a:hover { color: var(--fg); }
.topbar-nav a.is-active { color: var(--fg); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────── */
.page-footer {
  position: fixed; bottom: 14px; left: 0; right: 0;
  padding: 0 36px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-3);
  letter-spacing: 0.1em;
  z-index: 30;
  pointer-events: none;
}
.page-footer-links {
  display: flex; gap: 16px; pointer-events: auto;
}
.page-footer a { color: var(--muted-2); text-decoration: none; }
.page-footer a:hover { color: var(--fg); }

/* ── Scroll snap container (landing) ─────────────────────────────── */
/* `proximity` (au lieu de `mandatory`) + suppression de `scroll-snap-stop:
   always` : le scroll reste fluide et naturel (molette/trackpad) tout en
   « accrochant » doucement chaque section, au lieu de se verrouiller section
   par section (sensation « bizarre » / saccadée signalée). */
.snap-scroll {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.snap-scroll::-webkit-scrollbar { width: 0; }
.snap-section {
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { display: flex; align-items: center; justify-content: center; }
.hero-inner {
  width: 100%; max-width: 980px;
  padding: 0 32px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero-eyebrow { margin-bottom: 28px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--fg);
  margin: 0;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--muted);
  margin: 24px auto 0;
  line-height: 1.45;
  letter-spacing: -0.005em;
  max-width: 560px;
  text-wrap: pretty;
}

/* ── Search ─────────────────────────────────────────────────────── */
.search {
  position: relative;
  width: 100%; max-width: 520px;
  margin-top: 56px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 200ms ease;
}
.search:focus-within {
  border-color: var(--fg);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.15);
}
.search-icon { color: var(--muted-2); flex-shrink: 0; }
.search input {
  flex: 1;
  border: 0; outline: 0; background: transparent;
  font-family: var(--font-body); font-size: 16px;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.search kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 7px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px -15px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 30;
  max-height: 360px; overflow-y: auto;
}
.search-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 12px 16px;
  border: 0; background: transparent; cursor: pointer; text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-body);
  text-decoration: none; color: inherit;
}
.search-row:last-child { border-bottom: 0; }
.search-row:hover { background: var(--paper); }
.search-row .swatch {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.search-row .meta { flex: 1; min-width: 0; }
.search-row .meta-name { font-size: 14px; font-weight: 500; color: var(--fg); }
.search-row .meta-tagline {
  font-size: 12px; color: var(--muted-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-row .meta-tags { display: flex; gap: 4px; }
.search-row .meta-tags span {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--muted-3);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.search-empty {
  padding: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--muted-3);
}

/* ── Scroll cue ─────────────────────────────────────────────────── */
.scroll-cue {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--muted-3);
  letter-spacing: 0.22em; text-transform: uppercase;
  pointer-events: none;
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue svg { color: var(--muted-3); }
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ── Project section ────────────────────────────────────────────── */
.project { background: var(--bg); }
.project-rail {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 4px; background: var(--accent); opacity: 0.7;
}
.project-meta {
  position: absolute; top: 92px; left: 60px; right: 60px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted-3);
  letter-spacing: 0.18em; text-transform: uppercase;
  z-index: 2;
}
.project-meta-left { display: flex; gap: 24px; align-items: center; }
.meta-sep { width: 24px; height: 1px; background: #d6d3d1; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}
.project-grid {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 40px;
  padding: 0 60px;
}
.project-text { padding-left: 20px; }
.project-name {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 156px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.88;
  color: var(--fg);
  margin: 0 0 28px;
}
.project-tagline {
  font-family: var(--font-body);
  font-size: 22px; line-height: 1.4;
  color: var(--fg-soft);
  max-width: 460px;
  margin: 0 0 36px;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.project-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.project-mockup {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
.accent-halo {
  position: absolute;
  width: 70%; padding-bottom: 70%;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.08;
  filter: blur(40px);
}
.project-ghost {
  position: absolute; bottom: -50px; right: 60px;
  font-family: var(--font-display);
  font-size: clamp(220px, 28vw, 380px);
  font-weight: 700; line-height: 0.8;
  color: var(--accent);
  opacity: 0.08;
  letter-spacing: -0.06em;
  pointer-events: none; user-select: none;
}

/* ── Mockups (mobile + web) ──────────────────────────────────────── */
.mockup { transform-origin: center; position: relative; }
.mockup-mobile { transform: scale(0.7); }
.mockup-web    { transform: scale(0.55); }

/* Clickable mockup → zoom-to-open */
.mockup-link {
  cursor: zoom-in;
  outline: none;
}
.mockup-link .browser,
.mockup-link .phone {
  transition: transform 320ms cubic-bezier(0.34, 1.4, 0.64, 1),
              box-shadow 320ms ease;
}
.mockup-link:hover .browser {
  transform: translateY(-6px);
  box-shadow: 0 44px 100px -20px rgba(0,0,0,0.32),
              0 14px 28px -10px rgba(0,0,0,0.18);
}
.mockup-link:hover .phone {
  transform: translateY(-6px);
  box-shadow: 0 44px 100px -20px rgba(0,0,0,0.32),
              0 14px 28px -10px rgba(0,0,0,0.18);
}
.mockup-link:focus-visible .browser,
.mockup-link:focus-visible .phone {
  outline: 2px solid var(--accent);
  outline-offset: 10px;
}

/* "Ouvrir l'app" hint pill — visible on hover/focus */
.mockup-hint {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 12px);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(10,10,10,0.92);
  color: #fafaf9;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
  z-index: 4;
  white-space: nowrap;
}
.mockup-hint-icon {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
}
.mockup-link:hover .mockup-hint,
.mockup-link:focus-visible .mockup-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Zoom-to-open transition (fade siblings, render clone above) */
.zoom-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  opacity: 0;
  transition: opacity 540ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.zoom-backdrop.is-active { opacity: 1; }

.zoom-clone {
  position: fixed;
  z-index: 1001;
  transform-origin: top left;
  pointer-events: none;
  will-change: transform, top, left;
  margin: 0;
}
.zoom-clone .browser-chrome {
  transition: opacity 380ms ease 60ms;
}
.zoom-clone.is-final .browser-chrome { opacity: 0; }

body.is-zooming { overflow: hidden; }
body.is-zooming .topbar,
body.is-zooming .nav-arrows,
body.is-zooming .section-indicator,
body.is-zooming .page-footer,
body.is-zooming .maj-pill,
body.is-zooming .scroll-cue {
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .mockup-link .browser,
  .mockup-link .phone,
  .mockup-hint,
  .zoom-clone,
  .zoom-backdrop { transition: none !important; }
}

.phone {
  width: 320px; height: 660px;
  border-radius: 44px;
  background: #0a0a0a;
  padding: 12px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.25), 0 8px 20px -8px rgba(0,0,0,0.15);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 32px;
  background: var(--paper);
  overflow: hidden; position: relative;
}
.phone-notch {
  position: absolute;
  top: 20px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  background: #0a0a0a;
  border-radius: 18px;
  z-index: 2;
}
.browser {
  width: 880px; height: 560px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.18), 0 8px 20px -8px rgba(0,0,0,0.10);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.browser-chrome {
  height: 36px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center;
  padding: 0 14px; gap: 6px;
}
.browser-chrome .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e5e5e3;
}
.browser-url {
  margin-left: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-3);
  letter-spacing: 0.04em;
}
.browser-body { position: relative; width: 100%; height: calc(100% - 36px); overflow: hidden; }

.browser-preview {
  position: absolute; inset: 0;
  background: var(--paper);
  pointer-events: none;
  overflow: hidden;
}
.browser-frame {
  position: absolute; top: 0; left: 0;
  width: 1600px; height: 952px;
  border: 0;
  transform: scale(0.55);
  transform-origin: top left;
  background: var(--paper);
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
}
.browser-preview.is-loaded .browser-frame { opacity: 1; }

.browser-skeleton {
  position: absolute; inset: 0;
  padding: 60px 56px;
  display: flex; flex-direction: column; gap: 18px;
  background: linear-gradient(180deg, #fbfaf7 0%, #f3f2ef 100%);
  pointer-events: none;
  transition: opacity 380ms ease;
  z-index: 1;
}
.browser-preview.is-loaded .browser-skeleton { opacity: 0; }
.browser-skeleton-bar {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ececea 0%, #f6f5f2 50%, #ececea 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s linear infinite;
}
.browser-skeleton-block {
  flex: 1;
  margin-top: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ececea 0%, #f6f5f2 50%, #ececea 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s linear infinite;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mockup-stripes {
  position: absolute; inset: 0;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 7px,
    color-mix(in oklab, var(--accent) 18%, transparent) 7px,
    color-mix(in oklab, var(--accent) 18%, transparent) 8px
  );
}
.mockup-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1.7;
}
.mockup-label .mockup-sub { opacity: 0.6; }

/* ── About section ──────────────────────────────────────────────── */
.about { display: flex; align-items: center; justify-content: center; padding: 0 60px; }
.about-inner {
  max-width: 980px; width: 100%;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px;
  align-items: start;
}
.about-name {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 20px 0 0; color: var(--fg);
}
.about-right {
  font-size: 19px; line-height: 1.55; color: var(--fg-soft);
  letter-spacing: -0.005em;
}
.about-right p { margin: 0 0 20px; text-wrap: pretty; }
.about-right p.muted { color: var(--muted-2); margin-bottom: 36px; }

.contact-list { display: grid; gap: 0; }
.contact-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  font-size: 16px;
  transition: padding 200ms ease;
}
.contact-row:last-child { border-bottom: 1px solid var(--line); }
.contact-row:hover { padding-left: 8px; }
.contact-key {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted-3);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.contact-val {
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  color: var(--fg);
}

/* ── Section indicator (rotated mono pill) ───────────────────────── */
.section-indicator {
  position: fixed; top: 50%; right: 28px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center right;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-3);
  letter-spacing: 0.22em; text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 30;
}

/* ── Nav arrows (prev/next, fixed bottom-right) ──────────────────── */
.nav-arrows {
  position: fixed; bottom: 130px; right: 36px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 35;
}
.nav-arrows button {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--fg);
  transition: all 200ms ease;
}
.nav-arrows button:hover { background: rgba(255,255,255,0.95); transform: scale(1.05); }
.nav-arrows button:disabled { opacity: 0.3; cursor: default; transform: none; }

/* ── MAJ pill (CTA flottant vers /admin/parametres) ──────────────── */
.maj-pill {
  position: fixed; bottom: 22px; right: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 12px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 18px 50px -16px rgba(0,0,0,0.22), 0 3px 10px -4px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  z-index: 50;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.maj-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 60px -16px rgba(0,0,0,0.28), 0 4px 12px -4px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.6);
}
.maj-pill-icon { color: var(--muted); }

/* ── Page Apps — grille « applis iPhone » ────────────────────────── */
.page-apps { background: var(--bg); min-height: 100vh; }
.apps-home {
  min-height: 100vh;
  padding: 128px 32px 140px;
  max-width: 940px;
  margin: 0 auto;
}
.apps-head {
  text-align: center;
  margin-bottom: 64px;
  display: flex; flex-direction: column; align-items: center;
}
.apps-head .apps-eyebrow { margin-bottom: 22px; }
.apps-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin: 0 0 36px; color: var(--fg);
}
.apps-search { max-width: 480px; width: 100%; margin: 0 auto; }
.apps-count {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted-3);
}

/* Grille d'icônes */
.app-grid {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 38px 20px;
  max-width: 760px;
  justify-items: center;
}
.app-cell {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; min-width: 0;
}
.app-cell[hidden] { display: none; }
.app-tile {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  text-decoration: none; color: var(--fg);
  width: 100%; min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Squircle (partagé grille + écran de verrou) */
.app-icon {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 23px;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 30% 18%,
      color-mix(in oklch, var(--accent) 90%, white) 0%,
      var(--accent) 52%,
      color-mix(in oklch, var(--accent) 76%, black) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.35),
    inset 0 -3px 8px rgba(0,0,0,0.18),
    0 10px 22px -8px color-mix(in oklch, var(--accent) 50%, transparent),
    0 2px 6px rgba(0,0,0,0.12);
  transition: transform 240ms cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 240ms ease;
}
.app-icon::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 52%);
  pointer-events: none;
}
.app-icon-glyph {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600; line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.22);
}
/* Icône SVG dédiée (au-dessus du dégradé/glyphe de repli, sous le badge cadenas) */
.app-icon-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: inherit;
  display: block;
  z-index: 1;
}
.app-tile:hover .app-icon {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.35),
    inset 0 -3px 8px rgba(0,0,0,0.18),
    0 20px 38px -10px color-mix(in oklch, var(--accent) 55%, transparent),
    0 4px 10px rgba(0,0,0,0.14);
}
.app-tile:active .app-icon { transform: translateY(-1px) scale(0.97); }
.app-tile:focus-visible { outline: none; }
.app-tile:focus-visible .app-icon { outline: 2px solid var(--accent); outline-offset: 4px; }

.app-icon-lock {
  position: absolute; top: -7px; right: -7px;
  z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0a0a0a; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 1.5px solid var(--bg);
}
.app-tile.is-locked .app-icon { filter: saturate(0.82) brightness(0.98); }

.app-label {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-align: center;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-demo-link {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2); text-decoration: none;
  padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.app-demo-link:hover { color: var(--fg); border-color: var(--fg); background: var(--paper); }

.apps-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
  font-size: 15px;
}
.apps-empty em { color: var(--fg); font-style: normal; font-weight: 500; }

/* Variante large de l'icône (écran de verrou) */
.app-icon-lg { width: 104px; height: 104px; border-radius: 30px; }
.app-icon-lg .app-icon-glyph { font-size: 46px; }
.app-icon-lg .app-icon-lock { width: 30px; height: 30px; top: -9px; right: -9px; }

/* CTA verrouillé sur la landing */
.cta-lock { font-size: 12px; }

/* ── Écran de verrou (app protégée) ──────────────────────────────── */
.page-lock {
  display: grid; place-items: center; min-height: 100vh;
  background: var(--bg); padding: 110px 24px 64px;
}
.lock-card {
  width: min(460px, 92vw);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.lock-card .app-icon-lg { margin-bottom: 26px; }
.lock-card .hero-eyebrow { display: block; margin-bottom: 10px; }
.lock-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  margin: 0 0 12px;
}
.lock-sub { max-width: 390px; margin: 0 0 28px; line-height: 1.5; }
.lock-error {
  width: 100%;
  background: #fef2f2; color: #b42318;
  border: 1px solid #fecaca; border-radius: 10px;
  padding: 10px 14px; margin: 0 0 16px;
  font-size: 13px;
}
.lock-form { display: flex; gap: 10px; width: 100%; margin-bottom: 18px; flex-wrap: wrap; }
.lock-form input {
  flex: 1 1 200px;
  background: var(--card); color: var(--fg);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-family: var(--font-body); font-size: 15px;
  outline: none; transition: border-color 150ms ease;
}
.lock-form input:focus { border-color: var(--fg); }
.lock-form .btn-primary { padding: 12px 18px; }
.lock-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  justify-content: center;
}
.lock-demo-btn { padding: 11px 18px; }

/* ── Page login ─────────────────────────────────────────────────── */
.page-login {
  display: grid; place-items: center; min-height: 100vh;
  background: var(--bg);
}
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 40px;
  width: min(380px, 92vw);
  box-shadow: 0 20px 60px -15px rgba(0,0,0,0.08);
}
.login-card .brand-stack {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}
.login-card .hero-eyebrow { margin: 8px 0 24px; display: block; }
.login-card form { display: grid; gap: 14px; margin-top: 20px; }
.login-card label { display: grid; gap: 6px; }
.login-card label span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.login-card input {
  background: var(--paper);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 11px 13px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all 150ms ease;
}
.login-card input:focus {
  border-color: var(--fg);
  background: var(--card);
}
.login-card .btn-primary { padding: 13px; margin-top: 4px; }
.login-card .small { margin-top: 18px; text-align: center; }
.login-card .small a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }

/* ── Page admin ─────────────────────────────────────────────────── */
.page-admin {
  background: var(--bg);
  padding-top: 92px;
  min-height: 100vh;
}
.admin-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.admin-main .hero-eyebrow { display: block; margin-bottom: 12px; }
.admin-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 32px;
}
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.admin-card h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.kv-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  margin: 12px 0 0;
}
.kv-grid dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kv-grid dd { margin: 0; color: var(--fg); }
.row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 16px;
}
.log {
  background: #0b0d12;
  color: #d6dbe7;
  border: 1px solid #1c2030;
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 280px; overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 14px;
}

/* ── Demandes de modifications (timeline) ───────────────────────── */
.demande-form {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 8px;
}
.demande-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--paper);
  resize: vertical;
  transition: border-color 180ms ease, background 180ms ease;
}
.demande-form textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  background: var(--card);
}
.demande-form-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}

.timeline {
  list-style: none;
  margin: 22px 0 0;
  padding: 0 0 0 18px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding: 0 0 18px 18px;
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-dot {
  position: absolute;
  left: -18px; top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--fg);
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline-item.is-archived .timeline-dot {
  background: var(--paper-2);
  border-color: var(--muted-3);
}
.timeline-body {
  display: flex; flex-direction: column; gap: 4px;
}
.timeline-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timeline-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
}
.timeline-item.is-archived .timeline-text { color: var(--muted); }
.timeline-actions {
  display: flex; gap: 6px; margin-top: 4px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}
.btn-danger { color: var(--muted); }
.btn-danger:hover { color: #b42318; background: #fef3f2; }
.timeline-empty { margin: 18px 0 0; }
.timeline-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.link-archives {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 180ms ease, border-color 180ms ease;
}
.link-archives:hover { color: var(--fg); border-color: var(--fg); }

/* ── Pages d'erreur (404 / 500) ─────────────────────────────────── */
.page-404,
.page-500 {
  display: grid; place-items: center; min-height: 100vh;
  background: var(--bg);
  padding: 32px;
}
.error-card {
  max-width: 560px;
  text-align: left;
}
.error-card .hero-eyebrow { display: block; margin-bottom: 18px; }
.error-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 20px;
}
.error-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px;
}

/* ── Responsive : tablette (≤ 880px) ────────────────────────────── */
@media (max-width: 880px) {
  .topbar { padding: 16px 20px; }
  .topbar-nav { gap: 18px; font-size: 12px; }
  .project-meta { left: 24px; right: 24px; top: 80px; font-size: 10px; }
  .project-meta-left { gap: 14px; flex-wrap: wrap; }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 100px 24px 100px;
    align-items: start;
  }
  .project-text { padding-left: 0; }
  .project-mockup { min-height: 280px; }
  .mockup-mobile { transform: scale(0.5); }
  .mockup-web    { transform: scale(0.32); }
  .project-ghost { right: 16px; bottom: -30px; }

  .about-inner { grid-template-columns: 1fr; gap: 32px; }

  .nav-arrows { right: 16px; bottom: 100px; }
  .maj-pill { font-size: 10px; padding: 7px 12px 7px 10px; bottom: 16px; right: 16px; }
  .page-footer { padding: 0 18px; bottom: 8px; }
  .page-footer-links { gap: 10px; }

  .apps-home { padding: 104px 20px 120px; }
  .apps-head { margin-bottom: 48px; }
  .apps-title { font-size: clamp(36px, 9vw, 56px); margin-bottom: 28px; }
  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 32px 16px;
  }

  .admin-main { padding: 24px 18px 60px; }
  .kv-grid { grid-template-columns: 1fr; }
}

/* ── Responsive : smartphone (≤ 640px) ──────────────────────────── *
   On libère le scroll (proximity au lieu de mandatory + sections en
   flow naturel) et on enlève la chrome décorative qui chevauche le
   contenu sur petit écran (ghost, indicator rotaté, nav-arrows).
   On utilise svh/dvh quand dispo pour gérer la barre Safari iOS. */
@media (max-width: 640px) {
  /* Scroll-snap libéré : l'utilisateur peut scroller normalement,
     les sections "accrochent" doucement sans verrouiller. */
  .snap-scroll {
    height: 100svh;
    scroll-snap-type: y proximity;
  }
  .snap-section {
    height: auto;
    min-height: 100svh;
    width: 100%;
    overflow: visible;
    scroll-snap-stop: normal;
  }

  /* Padding safe-area (encoche iPhone) */
  .topbar {
    padding: 14px max(16px, env(safe-area-inset-right))
             14px max(16px, env(safe-area-inset-left));
  }
  .topbar-nav { gap: 14px; font-size: 12px; }
  .brand { font-size: 15px; }

  /* Hero */
  .hero { min-height: 100svh; padding: 90px 0 80px; }
  .hero-inner { padding: 0 22px; }
  .hero-eyebrow { font-size: 10px; margin-bottom: 22px; }
  .hero-title {
    font-size: clamp(46px, 13vw, 80px);
    line-height: 0.94;
    letter-spacing: -0.04em;
  }
  .hero-tagline {
    font-size: 16px;
    margin-top: 20px;
    line-height: 1.5;
  }
  .search { margin-top: 36px; padding: 12px 16px; gap: 10px; }
  .search input { font-size: 16px; /* >=16px évite le zoom iOS */ }
  .search kbd { display: none; }

  /* Project sections : on casse le position:absolute pour laisser
     le contenu respirer en flow vertical. */
  .project {
    min-height: 100svh;
    padding: 88px 0 72px;
  }
  .project-rail { width: 3px; }
  .project-meta {
    position: static;
    padding: 0 22px;
    margin: 0 0 18px;
    font-size: 10px;
    letter-spacing: 0.14em;
    flex-wrap: wrap; gap: 10px;
  }
  .project-meta-left { gap: 10px; }
  .meta-sep { width: 14px; }
  .project-tags { gap: 6px; }
  .tag { padding: 3px 8px; font-size: 9px; }

  .project-grid {
    position: static;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 12px 22px 24px;
    align-items: start;
  }
  .project-text { padding-left: 0; }
  .project-name {
    /* Min réduit pour que "Site d'entreprise" tienne, wrap autorisé */
    font-size: clamp(38px, 12vw, 64px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin: 0 0 18px;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .project-tagline {
    font-size: 16px;
    margin: 0 0 24px;
    line-height: 1.5;
  }
  .project-cta { gap: 14px; }
  .project-cta .btn-primary { padding: 11px 18px; font-size: 14px; }
  .project-cta .link-muted { font-size: 13px; }

  /* Mockup : cadre fixe et clipping pour éviter le débordement */
  .project-mockup {
    min-height: 220px;
    height: 240px;
    overflow: hidden;
  }
  .mockup-mobile { transform: scale(0.36); }
  .mockup-web    { transform: scale(0.24); }
  .mockup-hint { display: none; }
  .accent-halo { width: 60%; padding-bottom: 60%; }
  .project-ghost { display: none; }

  /* About */
  .about {
    min-height: 100svh;
    padding: 90px 22px 80px;
    align-items: flex-start;
  }
  .about-inner { gap: 24px; }
  .about-name { font-size: clamp(38px, 11vw, 56px); margin-top: 12px; }
  .about-right { font-size: 16px; line-height: 1.55; }
  .about-right p { margin-bottom: 16px; }
  .about-right p.muted { margin-bottom: 24px; }
  .contact-row { padding: 12px 0; font-size: 14px; }
  .contact-val { font-size: 14px; }

  /* Chrome décorative : on planque ce qui chevauche le contenu */
  .section-indicator { display: none; }
  .scroll-cue { bottom: 18px; font-size: 9px; gap: 8px; }
  .nav-arrows { display: none; }

  /* Footer : devient un footer normal sous le contenu */
  .page-footer {
    position: static;
    padding: 22px max(16px, env(safe-area-inset-right))
             max(22px, env(safe-area-inset-bottom))
             max(16px, env(safe-area-inset-left));
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-footer-links { gap: 14px; flex-wrap: wrap; }

  .maj-pill {
    bottom: max(14px, env(safe-area-inset-bottom));
    right: max(14px, env(safe-area-inset-right));
  }

  /* Page Apps */
  .apps-home { padding: 90px 16px 110px; }
  .apps-head { margin-bottom: 36px; }
  .apps-title { font-size: clamp(32px, 9vw, 48px); margin-bottom: 22px; }
  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 26px 12px;
  }
  .app-icon { width: 66px; height: 66px; border-radius: 20px; }
  .app-icon-glyph { font-size: 29px; }
  .app-label { font-size: 12px; }

  /* Login */
  .login-card { padding: 28px 24px; border-radius: 14px; }
  .login-card .brand-stack { font-size: 22px; }
}
