/* ───────────── Tokens ───────────── */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --fill: rgba(120, 120, 128, .12);

  /* Liquid Glass : presque transparent, c'est la réfraction qui fait le verre */
  --glass-tint: transparent;
  --glass-fx: saturate(160%) brightness(1.06);
  --glass-fallback: blur(12px) saturate(180%);
  --rim-a: rgba(255, 255, 255, 1);
  --rim-b: rgba(255, 255, 255, .3);
  --glass-shadow: 0 24px 60px -18px rgba(0, 0, 0, .3), 0 4px 10px -4px rgba(0, 0, 0, .12);
  --sheet-tint: rgba(250, 250, 252, .62);
  --glass-outline: rgba(0, 0, 0, .1);
  --nav-tint: rgba(255, 255, 255, .5);
  --accent: #0071e3;

  --green: #28c840;
  --orange: #ff9f0a;
  --grad: linear-gradient(90deg, #ff6a3d 0%, #ff3d9a 45%, #7a5cff 100%);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.35, .5, 1);
  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000; --surface: #101012; --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #6e6e73;
    --line: rgba(255, 255, 255, .1); --fill: rgba(120, 120, 128, .2);
    --glass-tint: transparent; --rim-a: rgba(255, 255, 255, .6); --rim-b: rgba(255, 255, 255, .12);
    --glass-shadow: 0 24px 60px -18px rgba(0, 0, 0, .85), 0 4px 10px -4px rgba(0, 0, 0, .4); --sheet-tint: rgba(22, 22, 24, .6); --glass-outline: rgba(255, 255, 255, .06); --nav-tint: transparent; --accent: #2997ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000; --surface: #101012; --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #6e6e73;
  --line: rgba(255, 255, 255, .1); --fill: rgba(120, 120, 128, .2);
  --glass-tint: transparent; --rim-a: rgba(255, 255, 255, .6); --rim-b: rgba(255, 255, 255, .12);
  --glass-shadow: 0 24px 60px -18px rgba(0, 0, 0, .85), 0 4px 10px -4px rgba(0, 0, 0, .4); --sheet-tint: rgba(22, 22, 24, .6); --glass-outline: rgba(255, 255, 255, .06); --nav-tint: transparent; --accent: #2997ff; color-scheme: dark;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.47 var(--font);
  letter-spacing: -.022em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
::selection { background: #7a5cff44; }
svg { flex-shrink: 0; }
.muted { color: var(--ink-2); margin: 0; }
.eyebrow { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid #0a84ff; outline-offset: 3px; border-radius: 10px; }

/* ───────────── Liquid Glass ───────────── */
.glass {
  position: relative; isolation: isolate;
  background: var(--tint, var(--glass-tint));
  -webkit-backdrop-filter: var(--glass-fallback); backdrop-filter: var(--glass-fallback);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .7),
    inset 0 -12px 24px -16px rgba(255, 255, 255, .6),
    inset 0 0 0 .5px rgba(255, 255, 255, .12),
    0 0 0 .5px var(--glass-outline),
    var(--glass-shadow);
}
/* liseré spéculaire : le bord qui attrape la lumière, orienté vers le pointeur */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none; z-index: 2;
  background: linear-gradient(var(--light, 135deg), var(--rim-a) 0%, var(--rim-b) 20%, transparent 42%, transparent 58%, var(--rim-b) 80%, var(--rim-a) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* reflet interne + halo qui suit le pointeur */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(200px circle at var(--mx, 50%) var(--my, -80%), rgba(255, 255, 255, .28), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 45%);
  mix-blend-mode: plus-lighter; opacity: .9; transition: opacity .4s var(--ease);
}

/* ───────────── Navigation ───────────── */
.nav-wrap { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 var(--gutter); pointer-events: none; }
.nav { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: min(720px, 100%); padding: 6px 6px 6px 20px; border-radius: 999px; }
.nav { --tint: var(--nav-tint); transition: background .5s var(--ease); }
.nav { --legible: 0 0 6px var(--bg), 0 0 14px var(--bg); }
.nav-name, .nav-links a { text-shadow: var(--legible); }
.nav-name { font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); text-decoration: none; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); background: var(--fill); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--fill); color: var(--ink); cursor: pointer; transition: transform .35s var(--spring), background .2s; }
.icon-btn:hover { transform: scale(1.08); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ───────────── Hero ───────────── */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 120px var(--gutter) 100px; overflow: hidden; view-timeline-name: --hero; }
.hero::before {
  content: ""; position: absolute; inset: -10% -10% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 25% 30%, rgba(255, 138, 92, .22), transparent 70%),
    radial-gradient(38% 34% at 78% 42%, rgba(139, 107, 255, .22), transparent 70%),
    radial-gradient(40% 30% at 50% 85%, rgba(63, 181, 255, .16), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); margin: 0 0 32px; letter-spacing: -.01em; }
.hero h1 { font-size: clamp(42px, 7.4vw, 96px); line-height: 1.02; font-weight: 700; letter-spacing: -.05em; }
.hero-sub { max-width: 540px; margin: 28px auto 0; font-size: clamp(19px, 2vw, 24px); line-height: 1.38; color: var(--ink-2); letter-spacing: -.025em; font-weight: 500; }
.hero-cta { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }

.scroll-hint { position: absolute; bottom: 32px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border-radius: 99px; border: 1.5px solid var(--ink-3); opacity: .6; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--ink-2); animation: wheel 2s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 26px; border-radius: 999px; font: 500 17px var(--font); letter-spacing: -.02em; text-decoration: none; border: 0; cursor: pointer; color: var(--ink); transition: transform .4s var(--spring), opacity .2s; }
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(.96); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
.btn-muted { background: none; border: 1px dashed var(--line); color: var(--ink-3); cursor: default; }
.btn-muted:hover { transform: none; }

/* ───────────── Sections ───────────── */
.section { max-width: var(--max); margin: 0 auto; padding: 110px var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2, .title { font-size: clamp(44px, 6.4vw, 80px); line-height: 1; font-weight: 700; letter-spacing: -.05em; }

/* Contrôle segmenté — la pastille devient une lentille Liquid Glass qu'on peut faire glisser */
.segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; max-width: 100%; overflow: visible; user-select: none; -webkit-user-select: none; }
.segmented button { position: relative; z-index: 3; border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 500 14px var(--font); letter-spacing: -.01em; color: var(--ink-2); white-space: nowrap; cursor: pointer; transition: color .25s; }
.segmented button:hover, .segmented button[aria-pressed="true"], .segmented button.under { color: var(--ink); }
.seg-indicator.glass {
  --tint: var(--surface);
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px; z-index: 1; pointer-events: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .1), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: translate .6s var(--spring), width .6s var(--spring), scale .45s var(--spring), background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.seg-indicator.glass.lifted {
  --tint: rgba(255, 255, 255, .03); z-index: 6; scale: var(--lift-x, 1.32) var(--lift-y, 1.32);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, .8), inset 0 -8px 14px -10px rgba(255, 255, 255, .7), 0 16px 30px -10px rgba(0, 0, 0, .35), 0 3px 8px -3px rgba(0, 0, 0, .15);
}
.seg-indicator.glass.dragging { transition: width .6s var(--spring), scale .2s var(--ease), background-color .35s var(--ease), box-shadow .35s var(--ease); }
:root[data-theme="dark"] .seg-indicator.glass:not(.lifted) { --tint: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-indicator.glass:not(.lifted) { --tint: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); } }

/* Boutons élastiques (appui + glisser, comme sur macOS) */
.btn:not(.btn-muted), .icon-btn { transition: transform .4s var(--spring), translate .7s var(--spring), scale .6s var(--spring), box-shadow .3s var(--ease), opacity .2s; touch-action: manipulation; }
.btn.pressing, .icon-btn.pressing { scale: 1.07; transition: transform .4s var(--spring), translate 0s, scale .22s var(--ease), box-shadow .3s var(--ease); }
.btn-primary.pressing { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 22px 44px -14px rgba(0, 0, 0, .5); }
.glass.pressing::after { opacity: 1; background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 50%); }
.btn:active, .icon-btn:active { transform: none; }

/* ───────────── Cartes projet ───────────── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative; aspect-ratio: 4 / 3.3; border-radius: var(--r-xl); overflow: hidden; cursor: pointer; background: var(--surface);
  box-shadow: 0 0 0 .5px var(--line), 0 30px 60px -30px rgba(0, 0, 0, .35);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.card.featured { grid-column: 1 / -1; aspect-ratio: 21 / 9.5; }
.card.hide { display: none; }
.card:hover { transform: translateY(-6px); box-shadow: 0 0 0 .5px var(--line), 0 44px 80px -30px rgba(0, 0, 0, .45); }
.card-media { position: absolute; inset: 0; transition: transform 1.2s var(--ease); }
.card-media svg, .card-media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.card:hover .card-media { transform: scale(1.05); }
.card-badges { position: absolute; top: 16px; left: 16px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.status-dot.live { background: var(--green); box-shadow: 0 0 0 3px rgba(40, 200, 64, .25); }
.status-dot.wip { background: var(--orange); box-shadow: 0 0 0 3px rgba(255, 159, 10, .25); }
.card-info {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 16px 16px 22px; border-radius: calc(var(--r-xl) - 12px);
}
.card-meta { font-size: 13px; font-weight: 600; letter-spacing: -.005em; opacity: .7; }
.card-info h3 { font-size: clamp(22px, 2.4vw, 30px); margin: 2px 0; line-height: 1.1; letter-spacing: -.035em; }
.card-info p { margin: 0; font-size: 15px; line-height: 1.35; opacity: .75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-arrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: transform .6s var(--spring); }
.card-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.card:hover .card-arrow { transform: rotate(90deg) scale(1.08); }
/* Teinte du verre adaptée à la couverture (comme Liquid Glass sur iOS) */
.tone-dark .glass { --tint: rgba(20, 20, 24, .32); color: #fff; }
.tone-dark .card-arrow { background: #fff; color: #000; }
.tone-light .glass { --tint: rgba(255, 255, 255, .42); color: #1d1d1f; }
.tone-light .card-arrow { background: #1d1d1f; color: #fff; }
.tone-dark .card-info { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }

/* ───────────── Chiffres (bento) ───────────── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.tile { background: var(--surface); border-radius: var(--r-lg); padding: 32px 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 220px; box-shadow: 0 0 0 .5px var(--line); }
.tile .num { font-size: clamp(48px, 6vw, 80px); font-weight: 700; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile:last-child .num { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.035em; line-height: 1.1; }
.tile .lbl { font-size: 17px; color: var(--ink-2); font-weight: 500; }

/* ───────────── À propos ───────────── */
.about { padding-top: 120px; padding-bottom: 140px; }
.statement { font-size: clamp(30px, 4.6vw, 60px); line-height: 1.1; font-weight: 600; letter-spacing: -.045em; max-width: 22ch; text-wrap: pretty; }
.statement .w { opacity: .16; transition: opacity .45s var(--ease); }
.statement .w.lit { opacity: 1; }
.stack { margin-top: 64px; }
.stack ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }

/* ───────────── Contact ───────────── */
.contact { background: var(--surface); border-radius: 44px; padding: clamp(64px, 10vw, 120px) var(--gutter); text-align: center; display: flex; flex-direction: column; align-items: center; box-shadow: 0 0 0 .5px var(--line); }
.contact h2 { font-size: clamp(60px, 11vw, 140px); line-height: 1.02; font-weight: 700; letter-spacing: -.055em; }
.contact-sub { font-size: clamp(18px, 2vw, 22px); margin: 20px 0 40px; font-weight: 500; }
.copy-feedback { min-height: 1.5em; margin: 16px 0 0; font-size: 14px; color: var(--ink-2); }

.foot { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; padding: 28px var(--gutter) 44px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); letter-spacing: -.005em; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ───────────── Fiche projet ───────────── */
.sheet {
  --tint: var(--sheet-tint); --glass-fx: blur(36px) saturate(190%); --glass-fallback: blur(40px) saturate(190%);
  width: min(1080px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 0;
  border-radius: var(--r-xl); color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(0, 0, 0, .22); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); }
.sheet[open] { animation: pop .6s var(--spring); }
.sheet[open]::backdrop { animation: fade .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.95); } }
@keyframes fade { from { opacity: 0; } }
.sheet-close { position: sticky; top: 16px; float: right; margin: 16px 16px 0 0; z-index: 5; }
.sheet-body:focus { outline: none; }
.sheet-body { padding: 48px clamp(20px, 4.5vw, 64px) 64px; }
.sheet-head { text-align: center; max-width: 720px; margin: 0 auto 40px; display: flex; flex-direction: column; align-items: center; }
.sheet-head h2 { font-size: clamp(44px, 7vw, 84px); line-height: 1; font-weight: 700; letter-spacing: -.05em; margin: 0 0 16px; }
.sheet-summary { font-size: clamp(19px, 2vw, 24px); color: var(--ink-2); margin: 0; line-height: 1.35; letter-spacing: -.025em; font-weight: 500; }

.gallery-wrap { position: relative; margin-bottom: 48px; }
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--fill); }
.gallery img { width: 100%; height: 100%; display: block; object-fit: contain; }
.gallery figure.generated svg { width: 100%; height: 100%; display: block; }
.gal-btn { position: absolute; top: calc(50% - 22px); width: 44px; height: 44px; }
.gal-btn.prev { left: 14px; }
.gal-btn.next { right: 14px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.dots span { width: 7px; height: 7px; border-radius: 99px; background: var(--ink-3); opacity: .35; transition: width .45s var(--spring), opacity .3s; }
.dots span.on { width: 22px; opacity: 1; background: var(--ink); }

.sheet-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.sheet-desc { font-size: 19px; line-height: 1.55; margin: 0; letter-spacing: -.02em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.specs { margin: 0; border-radius: var(--r-md); background: var(--fill); padding: 6px 20px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; text-align: right; font-weight: 500; }
.features { margin-top: 56px; }
.features h3 { font-size: 28px; margin-bottom: 20px; letter-spacing: -.04em; }
.features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.features li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--fill); font-size: 15px; line-height: 1.4; }
.features li svg { width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: #7a5cff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────── Apparition ───────────── */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Animations liées au scroll (Chrome, Edge, Safari 26+) */
@supports (animation-timeline: view()) {
  .card { animation: card-in linear both; animation-timeline: view(); animation-range: entry 0% cover 32%; }
  @keyframes card-in { from { opacity: 0; scale: .9; translate: 0 70px; } to { opacity: 1; scale: 1; translate: 0 0; } }
  .hero-inner { animation: hero-out linear both; animation-timeline: --hero; animation-range: exit 0% exit 75%; }
  @keyframes hero-out { to { opacity: 0; scale: .92; translate: 0 -40px; } }
}

/* ───────────── Responsive ───────────── */
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .segmented { overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card, .card.featured { aspect-ratio: 4 / 4.6; }
  .section { padding-top: 76px; padding-bottom: 76px; }
  .tile { min-height: 170px; padding: 24px 22px; }
  .sheet { width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .sheet[open] { animation-name: up; }
  .sheet-grid, .features ul { grid-template-columns: 1fr; gap: 28px; }
  .gal-btn { display: none; }
  .foot { flex-direction: column; }
}
@media (max-width: 480px) { .bento { grid-template-columns: 1fr; } }
@keyframes up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .statement .w { opacity: 1; }
}

/* ═════════════ Contenu du CV ═════════════ */

/* Accueil : titre + vitrine de projets en éventail */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(48px, 8vh, 88px); padding: 130px var(--gutter) 0; }
.showcase { position: relative; width: min(1240px, 100%); height: clamp(210px, 28vh, 300px); margin-bottom: -30px; }
.show-card {
  --w: clamp(190px, 21vw, 290px);
  position: absolute; left: 50%; bottom: 0; width: var(--w); aspect-ratio: 4 / 3; margin-left: calc(var(--w) / -2);
  border: 0; padding: 0; border-radius: 26px; overflow: hidden; cursor: pointer; background: var(--surface); z-index: var(--z);
  transform: translateX(calc(var(--k) * var(--w) * .8)) translateY(calc(var(--ak) * 30px)) rotate(calc(var(--k) * 5deg));
  box-shadow: 0 0 0 .5px var(--line), 0 40px 70px -30px rgba(0, 0, 0, .45);
  transition: translate .7s var(--spring), scale .7s var(--spring), box-shadow .5s var(--ease);
  animation: show-in 1.2s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms + 350ms);
}
@keyframes show-in { from { translate: 0 140px; opacity: 0; } }
.show-card:hover, .show-card:focus-visible { translate: 0 -18px; scale: 1.05; z-index: 20; box-shadow: 0 0 0 .5px var(--line), 0 50px 90px -30px rgba(0, 0, 0, .55); }
.show-media { position: absolute; inset: 0; }
.show-media svg, .show-media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.show-label { position: absolute; left: 12px; bottom: 12px; padding: 7px 14px; border-radius: 999px; font: 600 14px var(--font); letter-spacing: -.015em; }
@supports (animation-timeline: view()) {
  .showcase { animation: show-rise linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
  @keyframes show-rise { to { translate: 0 -80px; scale: 1.08; } }
}

/* À propos : portrait + texte */
.about-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.portrait { margin: 0; position: relative; }
.portrait-bg {
  aspect-ratio: 1 / 1.12; border-radius: 44px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(120% 90% at 25% 0%, #ffc29e 0%, #ff7aa8 42%, #7a5cff 100%);
  box-shadow: 0 50px 90px -45px rgba(122, 92, 255, .7);
}
.portrait-bg img { width: 84%; height: auto; display: block; filter: drop-shadow(0 24px 30px rgba(40, 0, 80, .3)); }
.portrait-tag { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }
.about-text p { margin: 24px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.about .statement { font-size: clamp(30px, 4vw, 52px); }

/* Parcours */
.timeline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; margin-top: 56px; align-items: start; }
.col-title { font-size: 15px; font-weight: 600; color: var(--ink-3); margin: 0 0 16px; letter-spacing: -.005em; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tl-item { background: var(--surface); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: 0 0 0 .5px var(--line); transition: opacity 1.1s var(--ease), filter 1.1s var(--ease), transform .6s var(--ease), box-shadow .5s var(--ease); }
.tl-item.in:hover { transform: translateY(-4px); box-shadow: 0 0 0 .5px var(--line), 0 28px 50px -30px rgba(0, 0, 0, .35); }
.tl-period { font-size: 13px; font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-item h4 { margin: 8px 0 3px; font-size: 21px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.tl-org { margin: 0; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.tl-item ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 15px; color: var(--ink-2); }
.tl-item ul li { position: relative; padding-left: 16px; }
.tl-item ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); opacity: .6; }

/* Compétences */
.skills-bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 48px; }
.tile.skill-tile { min-height: 0; justify-content: flex-start; gap: 22px; }
.skill-tile h3 { font-size: 24px; letter-spacing: -.035em; }
.skill-tile.wide { grid-column: 1 / -1; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 500; }
.langs { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.lang-row { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.lang-row .muted { font-size: 14px; }
.bar { display: block; height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.bar span { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--grad); border-radius: inherit; transform-origin: left; }
.reveal .bar span { transform: scaleX(0); transition: transform 1.4s var(--ease) .35s; }
.reveal.in .bar span { transform: none; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.extras .muted { font-size: 14px; margin-bottom: 12px; }

/* Contact */
.contact-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.email-copy { margin-top: 28px; border: 0; background: none; padding: 2px 0; font: 500 17px var(--font); letter-spacing: -.02em; color: var(--ink-2); cursor: pointer; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.email-copy:hover { color: var(--ink); border-color: var(--ink-3); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; }
}
@media (max-width: 760px) {
  .timeline-grid, .skills-bento, .extras { grid-template-columns: 1fr; }
  .show-card { --w: 150px; border-radius: 18px; }
  .show-label { font-size: 12px; padding: 5px 10px; left: 8px; bottom: 8px; }
  .showcase { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal .bar span { transform: none; }
}

/* Barre de navigation : pastille qui suit la section, lentille Liquid Glass à l'appui */
.nav-links { position: relative; user-select: none; -webkit-user-select: none; }
.nav-links a { position: relative; z-index: 3; }
.nav-links a.under { color: var(--ink); }
.nav-ind.glass { left: 0; top: 0; bottom: 0; transition: translate .6s var(--spring), width .6s var(--spring), scale .45s var(--spring), opacity .35s var(--ease), background-color .35s var(--ease), box-shadow .35s var(--ease); }
.nav-ind.glass:not(.lifted) { --tint: var(--fill); box-shadow: none; }
.nav-ind.glass:not(.lifted)::before { opacity: 0; }
.nav-ind.idle:not(.lifted) { opacity: 0; scale: .8; }
.nav-ind.glass.dragging { transition: width .6s var(--spring), scale .2s var(--ease), opacity .35s var(--ease), background-color .35s var(--ease), box-shadow .35s var(--ease); }

/* Photo détourée → photo pleine */
.portrait-bg { align-items: stretch; }
.portrait-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: none; }

[hidden] { display: none !important; }
.portrait-tag { --tint: rgba(10, 10, 14, .28); }

/* Pastilles au repos : simple remplissage, la réfraction ne s'active qu'à l'appui */
.seg-indicator.glass:not(.lifted) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.nav-ind.glass:not(.lifted) { --tint: rgba(120, 120, 128, .14); }

/* Pied de page */
.foot { display: block; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) max(44px, env(safe-area-inset-bottom)); border-top: 0; font-size: 13px; color: var(--ink-2); }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.foot-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { text-decoration: none; color: var(--ink-2); font-size: 14px; transition: color .2s; }
.foot-links a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 20px; color: var(--ink-3); font-size: 12.5px; }

/* ───────────── Barre d'onglets mobile (iOS) ───────────── */
.tabbar { display: none; --tint: color-mix(in srgb, var(--bg) 45%, transparent); --legible: 0 0 6px var(--bg), 0 0 14px var(--bg); }
.tab-links { position: relative; display: flex; user-select: none; -webkit-user-select: none; }
.tab-links a { position: relative; z-index: 3; padding: 10px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap; text-shadow: var(--legible); transition: color .25s; }
.tab-links a.under { color: var(--ink); }

/* ───────────── Ajustements responsive ───────────── */
.tile { min-height: 190px; }
@media (max-width: 760px) {
  .tabbar { display: block; position: fixed; z-index: 50; left: 50%; translate: -50% 0; bottom: max(14px, env(safe-area-inset-bottom)); padding: 5px; border-radius: 999px; max-width: calc(100vw - 24px); }
  .foot { padding-bottom: 112px; }
  .hero { min-height: auto; padding-top: 120px; gap: 52px; }
  .hero h1 { font-size: clamp(38px, 11vw, 56px); }
  .bento { grid-template-columns: 1fr 1fr; gap: 12px; }
  .bento .tile { min-height: 0; padding: 22px 20px; gap: 20px; border-radius: 24px; }
  .bento .tile:last-child .num { font-size: 22px; }
  .tile .num { font-size: 48px; }
  .tile .lbl { font-size: 15px; }
  .section-head { margin-bottom: 28px; }
  .contact { border-radius: 32px; }
  .contact-cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 360px) {
  .tab-links a { padding: 9px 10px; font-size: 13px; }
  .nav-name { font-size: 14px; }
}
@media (max-width: 760px) {
  .contact h2 { font-size: clamp(40px, 13vw, 140px); }
}

/* ───────────── Parcours : frise chronologique ───────────── */
.journey { --col: 190px; --rail: 56px; position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
/* rail gris + remplissage en dégradé piloté par le défilement */
.journey::before, .journey::after {
  content: ""; position: absolute; top: 8px; left: calc(var(--col) + var(--rail) / 2 - 1px); width: 2px; border-radius: 2px; pointer-events: none;
}
.journey::before { bottom: 8px; background: var(--line); }
.journey::after { height: calc((100% - 16px) * var(--p, 0)); background: linear-gradient(180deg, #ff6a3d, #ff3d9a 50%, #7a5cff); box-shadow: 0 0 12px rgba(255, 61, 154, .45); }

.jr-item { display: grid; grid-template-columns: var(--col) var(--rail) 1fr; align-items: start; }
.jr-item.hide { display: none; }
.jr-period { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 26px; text-align: right; }
.jr-period > span:first-child { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.jr-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #1f9d3a; background: rgba(40, 200, 64, .12); }
:root[data-theme="dark"] .jr-live { color: #4ade6b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jr-live { color: #4ade6b; } }
.jr-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(40, 200, 64, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(40, 200, 64, 0); } }

.jr-rail { position: relative; height: 100%; display: flex; justify-content: center; padding-top: 30px; z-index: 1; }
.jr-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-3); transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease), scale .5s var(--spring); }
.jr-item.reached .jr-dot { background: #ff3d9a; border-color: #fff; scale: 1.15; box-shadow: 0 0 0 4px rgba(255, 61, 154, .22), 0 0 16px rgba(255, 61, 154, .5); }
:root[data-theme="dark"] .jr-item.reached .jr-dot { border-color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jr-item.reached .jr-dot { border-color: #000; } }

.jr-card {
  background: var(--surface); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: 0 0 0 .5px var(--line);
  transition: transform .6s var(--ease), box-shadow .5s var(--ease);
}
.jr-item.in .jr-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 .5px var(--line), 0 30px 60px -32px rgba(0, 0, 0, .35); }
.jr-head { display: flex; gap: 18px; align-items: flex-start; }
.jr-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 10px 22px -10px rgba(0, 0, 0, .4); }
.jr-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jr-work { background: linear-gradient(145deg, #ff8a5c, #ff3d6e); }
.jr-design { background: linear-gradient(145deg, #ff6ac1, #a35cff); }
.jr-school { background: linear-gradient(145deg, #5c9dff, #7a5cff); }
.jr-tag { font-size: 13px; font-weight: 600; letter-spacing: -.005em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jr-card h3 { margin: 4px 0 4px; font-size: clamp(19px, 2vw, 23px); font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.jr-org { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.jr-points { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.jr-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.jr-points svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: #ff3d9a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .journey { --col: 130px; --rail: 44px; }
  .jr-points { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .journey { --rail: 30px; gap: 16px; }
  .journey::before, .journey::after { left: 14px; }
  .jr-item { grid-template-columns: var(--rail) 1fr; grid-template-areas: "rail period" "rail card"; column-gap: 8px; }
  .jr-rail { grid-area: rail; justify-content: flex-start; padding: 4px 0 0 7px; }
  .jr-period { grid-area: period; flex-direction: row; align-items: center; justify-content: flex-start; padding: 0 0 10px; text-align: left; }
  .jr-card { grid-area: card; padding: 22px 20px; }
  .jr-head { gap: 14px; }
  .jr-icon { width: 42px; height: 42px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .jr-live i { animation: none; } }

/* ───────────── Effet barre d'onglets iOS (Apple Music) ─────────────
   La lentille déborde de la barre ; ce qu'elle recouvre passe en bleu, au pixel près. */
.tab-accent {
  position: absolute; inset: 0; z-index: 5; display: flex; padding: inherit; gap: inherit; align-items: stretch;
  pointer-events: none; clip-path: inset(50% 50% 50% 50%);
  transition: clip-path .6s var(--spring);
}
.tab-accent.dragging { transition: none; }
.tab-accent > * { color: var(--accent) !important; text-shadow: none !important; }
.nav-links { --lift: 1; }
.nav-links .nav-ind { --lift-x: 1.22; --lift-y: 1.75; }
.segmented .seg-indicator { --lift-x: 1.22; --lift-y: 1.6; }
.tab-links .nav-ind { --lift-x: 1.16; --lift-y: 1.32; }

/* Barre d'onglets mobile : icône au-dessus du libellé, comme iOS */
.tab-links a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 15px 6px; font-size: 11px; font-weight: 600; letter-spacing: -.01em; }
.tab-links a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 360px) { .tab-links a { padding: 7px 11px 6px; } }

/* Comme iOS : les barres sont en verre dépoli (bords toujours réfractés), seule la lentille est cristalline */
.nav, .tabbar, .segmented { --glass-fx: blur(9px) saturate(185%) brightness(1.05); --glass-fallback: blur(16px) saturate(185%); }
.seg-indicator.glass.lifted { --glass-fx: saturate(160%) brightness(1.08); }

/* ═════════════ Effet iOS v2 (plus fidèle à la barre d'onglets d'Apple Music) ═════════════ */
/* La barre entière grossit légèrement et s'éclaircit pendant l'appui */
.nav, .tabbar, .segmented { transition: scale .55s var(--spring), background-color .4s var(--ease); }
.glass.bar-active { scale: 1.04; --tint: color-mix(in srgb, var(--bg) 14%, transparent); --glass-fx: blur(2px) saturate(170%) brightness(1.05); }
.nav.bar-active { scale: 1.025; }

/* Pastille au repos : plus sombre que la barre (comme iOS), onglet actif en bleu */
.nav-ind.glass:not(.lifted) { --tint: rgba(0, 0, 0, .06); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .seg-indicator.glass:not(.lifted) { --tint: rgba(0, 0, 0, .5); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(255, 255, 255, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-indicator.glass:not(.lifted) { --tint: rgba(0, 0, 0, .5); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(255, 255, 255, .06); } }

/* Lentille : quasi invisible au centre, liseré fin et lumineux en haut, ombre douce */
.seg-indicator.glass.lifted {
  --tint: rgba(255, 255, 255, .015);
  box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, .85), inset 0 -1px 1px rgba(255, 255, 255, .35), inset 0 0 0 .5px rgba(255, 255, 255, .25), 0 12px 28px -10px rgba(0, 0, 0, .4);
}
.nav-links .nav-ind { --lift-x: 1.18; --lift-y: 1.3; }
.tab-links .nav-ind { --lift-x: 1.16; --lift-y: 1.3; }
.segmented .seg-indicator { --lift-x: 1.18; --lift-y: 1.5; }

/* Barre du haut : icône au-dessus du libellé, comme la barre d'onglets */
.nav { padding: 5px 5px 5px 20px; }
.nav-links a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 14px 4px; font-size: 11px; font-weight: 600; letter-spacing: -.005em; }
.nav-links a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-links a:hover { background: none; color: var(--ink); }

/* ═════════════ Boîte à outils ═════════════ */
.skills-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "lang lang langs" "fw tools langs" "extra extra extra"; gap: 16px; }
.tile.tb-tile { min-height: 0; justify-content: flex-start; gap: 26px; padding: 28px; }
.tb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tb-head h3 { font-size: 24px; letter-spacing: -.035em; }
.tb-count { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tb-sub { font-size: 14px; margin: 4px 0 -10px; }

/* Icônes d'app, avec grossissement façon Dock au survol */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 22px 8px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.app-icon {
  position: relative; width: 60px; height: 60px; border-radius: 17px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, #fff), color-mix(in srgb, var(--c) 6%, #fff));
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08), inset 0 1px 1px rgba(255, 255, 255, .9), 0 8px 18px -10px color-mix(in srgb, var(--c) 70%, transparent);
  transition: scale .45s var(--spring), translate .45s var(--spring);
}
.app-icon img { width: 32px; height: 32px; display: block; }
.app-icon.app-mono { background: linear-gradient(150deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 80%, #000)); }
.app-icon b { color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.app-name { font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 1.2; }
.app:hover .app-icon { scale: 1.2; translate: 0 -4px; }
.app:hover + .app .app-icon, .app:has(+ .app:hover) .app-icon { scale: 1.08; translate: 0 -2px; }
:root[data-theme="dark"] .app-icon:not(.app-mono) { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, #2c2c2e), color-mix(in srgb, var(--c) 8%, #1c1c1e)); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .1), inset 0 1px 1px rgba(255, 255, 255, .12), 0 8px 18px -10px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .app-dark img { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-icon:not(.app-mono) { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, #2c2c2e), color-mix(in srgb, var(--c) 8%, #1c1c1e)); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .1), inset 0 1px 1px rgba(255, 255, 255, .12), 0 8px 18px -10px rgba(0, 0, 0, .8); }
  :root:not([data-theme="light"]) .app-dark img { filter: invert(1); }
}

/* Langues : anneaux façon Apple Watch */
.tb-langs { align-items: stretch; }
.rings { width: min(240px, 80%); height: auto; align-self: center; transform: rotate(-90deg); margin: 4px 0; }
.ring-track, .ring { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring-track { opacity: .16; }
.ring { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.6s var(--ease) .3s; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .15)); }
.reveal.in .ring { stroke-dashoffset: var(--off); }
.ring-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.ring-legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.ring-legend i { width: 10px; height: 10px; border-radius: 50%; }
.ring-legend .muted { font-size: 14px; }

/* Certifications */
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.certs li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--fill); }
.certs b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.certs small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.cert-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .4); }
.cert-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cert-aid { background: linear-gradient(145deg, #ff6b6b, #e5383b); }
.cert-water { background: linear-gradient(145deg, #4cc9f0, #4361ee); }
.cert-car { background: linear-gradient(145deg, #8e8e93, #48484a); }

@media (max-width: 900px) {
  .skills-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "lang lang" "fw tools" "langs langs" "extra extra"; }
  .tb-langs { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 28px; }
  .tb-langs .tb-head { grid-column: 1 / -1; }
  .tb-langs .rings { width: 170px; }
  .tb-langs .ring-legend { align-self: center; }
}
@media (max-width: 640px) {
  .skills-bento { grid-template-columns: 1fr; grid-template-areas: "lang" "fw" "tools" "langs" "extra"; }
  .tile.tb-tile { padding: 22px 20px; }
  .apps { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .app-icon { width: 54px; height: 54px; border-radius: 15px; }
  .tb-langs { grid-template-columns: 1fr; }
  .tb-langs .rings { width: 170px; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) { .ring { transition: none; stroke-dashoffset: var(--off); } }

/* ═════════════ Contact : tuile aurore + verre liquide ═════════════ */
.contact {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 44px; padding: 0;
  background: #0b0b12; color: #fff; box-shadow: 0 50px 100px -50px rgba(122, 92, 255, .6);
}
.contact-aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(60px) saturate(140%); opacity: .95; }
.contact-aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: aurora 18s ease-in-out infinite alternate; }
.contact-aurora span:nth-child(1) { width: 55%; height: 70%; left: 2%; top: 10%; background: #ff6a3d; }
.contact-aurora span:nth-child(2) { width: 50%; height: 65%; right: 4%; top: 0; background: #7a5cff; animation-duration: 22s; animation-delay: -6s; }
.contact-aurora span:nth-child(3) { width: 45%; height: 60%; left: 30%; bottom: -5%; background: #ff3d9a; animation-duration: 20s; animation-delay: -3s; }
.contact-aurora span:nth-child(4) { width: 35%; height: 45%; right: 18%; bottom: 5%; background: #2fb8ff; animation-duration: 26s; animation-delay: -10s; opacity: .7; }
@keyframes aurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, -6%) scale(1.12); } 100% { transform: translate(-6%, 8%) scale(.92); } }
.contact::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 50% 120%, rgba(0, 0, 0, .55), transparent 60%), linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .35)); pointer-events: none; }
.contact-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(64px, 9vw, 112px) var(--gutter) clamp(44px, 6vw, 64px); }
.contact .glass { --tint: rgba(255, 255, 255, .1); --glass-fx: blur(6px) saturate(170%) brightness(1.08); --rim-a: rgba(255, 255, 255, .9); --rim-b: rgba(255, 255, 255, .25); color: #fff; }
.contact-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 26px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.contact h2 { color: #fff; background: none; -webkit-text-fill-color: #fff; font-size: clamp(56px, 11vw, 148px); line-height: 1; font-weight: 700; letter-spacing: -.055em; text-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.contact-sub { max-width: 560px; margin: 22px 0 38px; font-size: clamp(17px, 1.9vw, 21px); line-height: 1.45; font-weight: 500; color: rgba(255, 255, 255, .82); letter-spacing: -.02em; }
.contact-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-light { background: #fff; color: #0b0b12; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); }
.btn-light svg { width: 18px; height: 18px; }
.contact .btn.glass { color: #fff; }

.email-copy { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; padding: 10px 12px 10px 20px; border: 0; border-radius: 999px; cursor: pointer; font: 500 16px var(--font); letter-spacing: -.015em; color: #fff; transition: transform .4s var(--spring); }
.email-copy:hover { transform: scale(1.03); }
.email-copy-icon { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.email-copy-icon svg { position: absolute; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity .25s, scale .35s var(--spring); }
.email-copy .i-done { opacity: 0; scale: .5; }
.email-copy.copied .i-copy { opacity: 0; scale: .5; }
.email-copy.copied .i-done { opacity: 1; scale: 1; }
.email-copy.copied .email-copy-icon { background: #30d158; }
.contact .copy-feedback { color: rgba(255, 255, 255, .75); margin-top: 10px; }

.contact-facts { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(780px, 100%); }
.contact-facts li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; text-align: left; }
.contact-facts svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.contact-facts b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.contact-facts small { display: block; font-size: 13px; color: rgba(255, 255, 255, .7); margin-top: 1px; }

/* ═════════════ Centres d'intérêt : tuiles avec icônes ═════════════ */
.interests { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.interests li { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--fill); font-size: 14.5px; font-weight: 500; letter-spacing: -.01em; transition: transform .45s var(--spring), background .3s; }
.interests li:hover { transform: translateY(-3px) scale(1.03); background: color-mix(in srgb, var(--fill) 60%, var(--surface)); }
.int-icon { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 80%, #000)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 6px 14px -8px var(--c); }
.int-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .contact { border-radius: 32px; }
  .contact-facts { grid-template-columns: 1fr; }
  .contact .contact-cta .btn { flex: 1 1 auto; justify-content: center; }
  .interests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .contact-aurora span { animation: none; } }

.contact .glass { --tint: rgba(255, 255, 255, .16); text-shadow: 0 1px 10px rgba(0, 0, 0, .25); }

/* Fiche projet : barre de défilement fine façon macOS, contenue dans la bulle (loin des coins arrondis) */
.sheet::-webkit-scrollbar { width: 14px; }
.sheet::-webkit-scrollbar-track { background: transparent; margin: 34px 0; }
.sheet::-webkit-scrollbar-thumb { background: rgba(120, 120, 128, .38); border-radius: 99px; border: 4px solid transparent; background-clip: padding-box; }
.sheet::-webkit-scrollbar-thumb:hover { background-color: rgba(120, 120, 128, .6); }
.sheet::-webkit-scrollbar-button { display: none; height: 0; }
@supports not selector(::-webkit-scrollbar) {
  .sheet { scrollbar-width: thin; scrollbar-color: rgba(120, 120, 128, .45) transparent; }
}

/* Fiche projet : le contenu défile à l'intérieur, sans barre visible ; indicateur fin qui apparaît au défilement */
.sheet { overflow: hidden; }
.sheet-scroll { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; border-radius: inherit; }
.sheet-scroll::-webkit-scrollbar { display: none; }
.sheet-close { position: absolute; top: 16px; right: 16px; float: none; margin: 0; z-index: 7; }
.sheet-thumb { position: absolute; top: 0; right: 7px; width: 5px; height: 40px; border-radius: 99px; background: rgba(120, 120, 128, .55); opacity: 0; transition: opacity .45s var(--ease); pointer-events: none; z-index: 6; }
.sheet-thumb.on { opacity: 1; transition-duration: .15s; }
@media (max-width: 760px) { .sheet-scroll { max-height: 94dvh; } }

/* Vitrine de l'accueil : cartes entières (plus de coupure nette) et fondu doux vers la section suivante */
.showcase { margin-bottom: clamp(40px, 7vh, 72px); height: clamp(230px, 31vh, 320px); -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }
.show-card { bottom: 34px; }
.show-card:hover, .show-card:focus-visible { -webkit-mask-image: none; }
@media (max-width: 760px) { .showcase { height: 210px; margin-bottom: 36px; } .show-card { bottom: 26px; } }
.showcase {
  width: calc(100% + 2 * var(--gutter)); max-width: none; margin-inline: calc(-1 * var(--gutter));
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, #000 58%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, #000 58%, transparent 100%);
  mask-composite: intersect;
}

/* Performance : animations en pause hors écran */
.contact.paused .contact-aurora span { animation-play-state: paused; }

/* Boîte à outils : vrais logos en couleur sur une tuile neutre façon icône d'app */
.app-icon:not(.app-mono) { background: linear-gradient(170deg, #ffffff, #f2f2f5); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1), 0 8px 18px -10px rgba(0, 0, 0, .35); }
.app-icon img { width: 34px; height: 34px; object-fit: contain; }
:root[data-theme="dark"] .app-icon:not(.app-mono) { background: linear-gradient(170deg, #3a3a3c, #232325); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 8px 18px -10px rgba(0, 0, 0, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-icon:not(.app-mono) { background: linear-gradient(170deg, #3a3a3c, #232325); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 8px 18px -10px rgba(0, 0, 0, .8); } }

/* Navbar et barre d'onglets : verre clair (réfraction seule, sans flou) */
:root { --nav-tint: rgba(255, 255, 255, .16); }
.nav, .tabbar { --tint: var(--nav-tint); --glass-fx: saturate(170%) brightness(1.06); --glass-fallback: blur(14px) saturate(180%); }
.tabbar { --tint: color-mix(in srgb, var(--bg) 18%, transparent); }
.nav.bar-active, .tabbar.bar-active { --glass-fx: saturate(160%) brightness(1.08); }
.nav-links a, .tab-links a, .nav-name { text-shadow: 0 0 8px var(--bg), 0 0 16px var(--bg); }
/* Mode clair : teinte modérée pour la lisibilité au-dessus des images sombres, toujours sans flou */
:root:not([data-theme="dark"]) .nav { --tint: rgba(255, 255, 255, .5); }
:root:not([data-theme="dark"]) .tabbar { --tint: rgba(255, 255, 255, .5); }
:root:not([data-theme="dark"]) .nav-links a, :root:not([data-theme="dark"]) .tab-links a, :root:not([data-theme="dark"]) .nav-name { text-shadow: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav, :root:not([data-theme="light"]) .tabbar { --tint: rgba(255, 255, 255, .04); }
  :root:not([data-theme="light"]) .nav-links a, :root:not([data-theme="light"]) .tab-links a, :root:not([data-theme="light"]) .nav-name { text-shadow: 0 0 8px #000, 0 0 16px #000; }
}
:root:not([data-theme="dark"]) .nav-links a:not(.under), :root:not([data-theme="dark"]) .tab-links a:not(.under) { color: #3a3a3c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-links a:not(.under), :root:not([data-theme="light"]) .tab-links a:not(.under) { color: var(--ink-2); } }

/* Bouton + des cartes : toujours un cercle parfait */
.card-arrow { flex: none; width: 40px; height: 40px; aspect-ratio: 1; }
.card-info > div { min-width: 0; }

/* Barres glissables : pas de glisser natif des liens ni de menu d'aperçu (iOS), pas de sélection de texte */
.nav-links, .tab-links, .segmented { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.nav-links a, .tab-links a, .segmented button, .nav-links svg, .tab-links svg { -webkit-user-drag: none; -webkit-touch-callout: none; }
