/* =========================================================
   Amadou Manel Camara — portfolio (thème clair)
   ========================================================= */
:root {
  --bg: #f4f1ea;          /* papier chaud */
  --bg-2: #ebe6dc;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --line: rgba(24, 23, 19, .1);
  --line-2: rgba(24, 23, 19, .18);
  --ink: #181713;
  --ink-2: #4a4840;
  --muted: #7d7a70;
  --accent: #e8501f;
  --accent-ink: #c33f12;   /* accent lisible en texte */
  --accent-soft: rgba(232, 80, 31, .1);
  --live: #17914b;
  --live-soft: rgba(23, 145, 75, .1);
  --amber: #b57800;

  /* éléments sombres (terminal, téléphone, contact) */
  --night: #141512;
  --night-2: #1d1f1b;
  --night-ink: #efeee7;
  --night-muted: #8f918a;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --shadow: 0 1px 2px rgba(24,23,19,.05), 0 12px 32px -12px rgba(24,23,19,.18);
  --shadow-lg: 0 2px 4px rgba(24,23,19,.04), 0 40px 80px -30px rgba(24,23,19,.32);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.02em; }
p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
strong { color: var(--ink); font-weight: 600; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.dim { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); z-index: 60; }

/* ---------- dots ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.dot.live { background: #3ccf75; animation: pulse 2.4s infinite; }
.dot.amber { background: #f0b232; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(60,207,117,.55); } 70% { box-shadow: 0 0 0 9px rgba(60,207,117,0); } 100% { box-shadow: 0 0 0 0 rgba(60,207,117,0); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(244, 241, 234, .82); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font: italic 400 21px/1 var(--serif); padding-bottom: 3px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: rgba(24,23,19,.06); }
.nav-links .nav-cta { background: var(--ink); color: var(--bg); font-weight: 600; margin-left: 8px; }
.nav-links .nav-cta:hover, .nav-links .nav-cta.active { background: var(--accent); color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.nav-toggle span:first-child { top: 17px; } .nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- buttons & links ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: transform .25s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(232,80,31,.7); }
.btn-primary:hover { background: var(--ink); box-shadow: none; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink-2); font-family: var(--mono); font-weight: 400; font-size: 13.5px; background: rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.visit { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--sans); color: var(--ink); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); transition: all .2s; }
.visit:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.visit span { transition: transform .2s var(--ease); }
.visit:hover span { transform: translate(2px, -2px); }

/* ---------- hero ---------- */
.hero {
  min-height: min(100svh, 940px);
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px);
  padding-top: 120px; padding-bottom: 64px;
  position: relative;
}
.hero::before {
  content: ""; position: absolute; width: 720px; height: 720px; right: -160px; top: -80px; z-index: -1;
  background: radial-gradient(circle, rgba(232,80,31,.16), transparent 62%);
}
.eyebrow { display: flex; align-items: center; gap: 10px; font: 400 13px var(--mono); color: var(--ink-2); margin-bottom: 28px; }
.hero-title { font-size: clamp(42px, 5.8vw, 88px); line-height: .98; letter-spacing: -.045em; }
.hero-title em { color: var(--accent); font-size: 1.06em; letter-spacing: -.02em; }
.hero-lede { margin-top: 28px; max-width: 540px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { position: relative; padding-bottom: 170px; }
.showcase-hero .browser { transform: perspective(1600px) rotateY(-8deg) rotateX(3deg); transform-origin: left center; transition: transform .8s var(--ease); }
.hero-visual:hover .showcase-hero .browser { transform: none; }
.board {
  position: absolute; left: -56px; bottom: 0; width: min(320px, 80%);
  background: var(--night); color: var(--night-ink);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.board .dim { color: var(--night-muted); }
.board-head, .board-foot { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; }
.board-head { border-bottom: 1px solid rgba(255,255,255,.08); }
.board-foot { border-top: 1px solid rgba(255,255,255,.08); color: var(--night-muted); font-size: 11.5px; }
.board-list { list-style: none; margin: 0; padding: 4px 0; }
.board-list li { display: flex; align-items: center; gap: 11px; padding: 8px 16px; font: 400 13px var(--mono); }
.board-list li > :nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list a:hover { color: #ff8a62; }
.board-list li + li { border-top: 1px dashed rgba(255,255,255,.07); }
.tag-s { font-size: 10.5px; color: var(--night-muted); border: 1px solid rgba(255,255,255,.14); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.cursor { color: #ff8a62; animation: blink 1.1s steps(1) infinite; }

/* ---------- browser / phone showcase ---------- */
.showcase { position: relative; padding: 0 0 7% 0; }
.showcase-solo, .showcase-hero { padding: 0; }
.browser {
  display: block; position: relative;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-lg);
  transition: transform .5s var(--ease), box-shadow .5s;
}
a.browser:hover { transform: translateY(-4px); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e1ddd3; flex: none; }
.browser-bar i:nth-child(1) { background: #ff6159; } .browser-bar i:nth-child(2) { background: #ffbd2e; } .browser-bar i:nth-child(3) { background: #28c941; }
.url { flex: 1; margin: 0 6% 0 10px; height: 22px; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; font: 400 11px var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.url::before { content: "🔒"; font-size: 9px; margin-right: 6px; filter: grayscale(1) opacity(.6); }
.screen { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-2); }
.scroll-shot { position: absolute; top: 0; left: 0; width: 100%; height: auto; will-change: transform; }
.js .scroll-shot.ready { animation: scrollshot var(--dur, 16s) ease-in-out var(--delay, 0s) infinite; animation-play-state: paused; }
.js .playing .scroll-shot.ready { animation-play-state: running; }
.js .showcase:hover .scroll-shot.ready, .js .client-media:hover .scroll-shot.ready { animation-play-state: paused; }
@keyframes scrollshot {
  0%, 8% { transform: translateY(0); }
  46%, 54% { transform: translateY(calc(-1 * var(--dist, 0px))); }
  92%, 100% { transform: translateY(0); }
}
.phone {
  position: absolute; right: -3%; bottom: 0; width: 25%;
  padding: 7px; border-radius: 30px; background: var(--night);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone::before { content: ""; position: absolute; top: 12px; left: 50%; width: 30%; height: 8px; border-radius: 6px; background: var(--night); transform: translateX(-50%); z-index: 2; }
.phone .screen { aspect-ratio: 9 / 19; border-radius: 24px; background: #fff; }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; background: var(--surface-2); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 50s linear infinite; }
.marquee-track span { font: italic 400 clamp(22px, 2.4vw, 30px) var(--serif); color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "✦"; font: 400 12px var(--sans); color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); padding-top: 64px; padding-bottom: 24px; }
.stat { padding: 8px 20px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-n { font: 400 clamp(44px, 5vw, 68px)/1 var(--serif); letter-spacing: -.02em; }
.stat-l { color: var(--muted); font-size: 14px; line-height: 1.4; }

/* ---------- sections ---------- */
.section { padding-top: clamp(88px, 11vw, 150px); padding-bottom: clamp(40px, 6vw, 72px); }
.section-alt { background: var(--bg-2); padding-bottom: clamp(88px, 11vw, 150px); margin-top: clamp(48px, 6vw, 80px); }
.section-head { max-width: 820px; margin-bottom: clamp(40px, 6vw, 72px); }
.kicker { color: var(--accent-ink); margin-bottom: 18px; text-transform: uppercase; letter-spacing: .08em; }
.section-head h2, .contact-title { font-size: clamp(36px, 5vw, 68px); line-height: 1.02; letter-spacing: -.04em; }
.section-head h2 em { color: var(--muted); }
.section-lede { margin-top: 22px; color: var(--ink-2); max-width: 620px; font-size: 18px; }

/* ---------- products ---------- */
.products { display: grid; gap: clamp(72px, 10vw, 140px); }
.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.product:nth-child(even) .product-media { order: 2; }
.product-info { display: flex; flex-direction: column; gap: 18px; }
.product-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.num { color: var(--muted); }
.badge { font: 500 11.5px var(--mono); padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.badge-live { background: var(--live-soft); color: var(--live); }
.product h3 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.04em; line-height: 1; }
.product h3 span { display: block; font: italic 400 .52em/1.3 var(--serif); color: var(--muted); letter-spacing: 0; margin-top: 8px; }
.product-info > p:not(.stack) { color: var(--ink-2); font-size: 17px; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.facts li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 15.5px; }
.facts li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.stack { color: var(--muted); line-height: 1.8; }

/* panels (visuels maison) */
.panel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); padding: clamp(20px, 3vw, 32px); position: relative; overflow: hidden; }

/* ---------- agency / clients ---------- */
.agency { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; margin-bottom: clamp(56px, 8vw, 96px); }
.agency .section-head { margin-bottom: 0; }
.agency .visit { margin-top: 28px; }
.clients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.client { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 26px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .3s; }
.client:hover { box-shadow: var(--shadow); }
.client > :not(.client-media) { margin-inline: 12px; }
.client-media { margin-bottom: 10px; }
.client-media .browser { box-shadow: none; border-radius: 12px; }
.client-media .browser-bar { height: 28px; }
.client-media .url { height: 18px; font-size: 10px; }
.client-top { display: flex; justify-content: space-between; gap: 12px; }
.tag { color: var(--accent-ink); }
.client h3 { font-size: 26px; letter-spacing: -.03em; }
.client p { color: var(--ink-2); font-size: 15.5px; }
.client .visit { margin-top: auto; }

/* yas-move visual */
.vis-fleet { aspect-ratio: 16 / 11.2; box-shadow: none; border-radius: 12px; padding: 16px; display: grid; align-content: start; gap: 8px; background: var(--surface-2); }
.fleet-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin-bottom: 4px; }
.fleet-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.plate { font-size: 11px; padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; }
.drv { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.ok { background: var(--live-soft); color: var(--live); }
.chip.warn { background: rgba(240,178,50,.16); color: var(--amber); }
.chip.bad { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- parcours ---------- */
.parcours { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.portrait { position: sticky; top: 100px; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 4.6; object-fit: cover; }
.portrait-cap { padding: 12px 16px; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); }
.timeline li { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 0 0 36px 28px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.when { color: var(--accent-ink); padding-top: 3px; }
.timeline h3 { font-size: 19px; letter-spacing: -.015em; line-height: 1.3; }
.timeline p { color: var(--ink-2); font-size: 15.5px; margin-top: 6px; }
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cert { background: var(--surface); border-radius: 14px; padding: 18px; display: grid; gap: 6px; }
.cert span { color: var(--muted); }
.cert b { font-weight: 500; font-size: 16px; line-height: 1.35; }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.skill { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line-2); }
.skill:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line-2); }
.skill h3 { font: italic 400 27px/1.2 var(--serif); letter-spacing: 0; margin-bottom: 10px; }
.skill p { color: var(--ink-2); font-size: 15.5px; }
.langs { margin-top: 32px; color: var(--muted); }

/* ---------- contact (seul bloc sombre) ---------- */
.contact { margin-top: clamp(64px, 9vw, 120px); padding-top: clamp(96px, 13vw, 170px); background: radial-gradient(ellipse at 15% 0%, rgba(232,80,31,.28), transparent 55%), var(--night); color: var(--night-ink); }
.contact .kicker { color: #ff8a62; }
.contact-title { font-size: clamp(44px, 7vw, 104px); line-height: .98; }
.contact-title em { color: var(--night-muted); }
.contact-mail { display: inline-flex; align-items: center; gap: 16px; margin-top: 44px; font: italic 400 clamp(26px, 4.4vw, 56px)/1.1 var(--serif); color: #ff8a62; border-bottom: 1px solid currentColor; padding-bottom: 6px; overflow-wrap: anywhere; transition: gap .3s var(--ease), color .2s; }
.contact-mail:hover { gap: 28px; color: var(--night-ink); }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.contact-links a { padding: 10px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font: 400 13.5px var(--mono); color: #d6d5cd; transition: all .2s; }
.contact-links a:hover { border-color: var(--night-ink); color: var(--night-ink); }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(80px, 10vw, 130px); padding-top: 24px; padding-bottom: 28px; color: var(--night-muted); border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- hero : diaporama des produits ---------- */
.hero-shot { position: absolute; top: 0; left: 0; width: 100%; height: auto; opacity: 0; transition: opacity .7s var(--ease); will-change: transform, opacity; }
.hero-shot.is-active { opacity: 1; }
.js .hero-shot.is-active.panning { animation: heropan var(--slide, 6s) cubic-bezier(.45, .05, .35, 1) forwards; }
@keyframes heropan { 0%, 14% { transform: translateY(0); } 100% { transform: translateY(calc(-1 * var(--pan, 0px))); } }
.board-list li { position: relative; cursor: default; transition: background .25s; }
.board-list li.is-active { background: rgba(255,255,255,.07); }
.board-list li.is-active a { color: #ff8a62; }
.board-list li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: #ff8a62; transform: scaleX(0); transform-origin: 0 50%; }
.js .board-list li.is-active.timing::after { animation: slidebar var(--slide, 6s) linear forwards; }
@keyframes slidebar { to { transform: scaleX(1); } }

/* ---------- Waxal : carte audio posée sur l'aperçu ---------- */
.showcase-audio { padding-bottom: 12%; }
.audio-card {
  position: absolute; left: -4%; bottom: 0; width: 44%; z-index: 2;
  background: radial-gradient(ellipse at 50% 0%, rgba(232,80,31,.28), transparent 65%), var(--night);
  color: var(--night-ink); border-radius: 16px; padding: 14px 16px 16px;
  box-shadow: var(--shadow-lg); display: grid; gap: 10px;
}
.audio-top { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #cfccc2; }
.audio-top span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-top .dim { color: var(--night-muted); }
.dot.rec { background: #ff4d4d; animation: blink 1.2s steps(1) infinite; }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 52px; min-width: 0; overflow: hidden; }
.wave i { flex: 0 1 4px; min-width: 2px; border-radius: 4px; background: #ff7a4d; height: calc(var(--h) * 1%); animation: bar 1.6s ease-in-out infinite; animation-delay: var(--d); }
@keyframes bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.audio-tr { font-size: 11px; line-height: 1.45; color: #d6d5cd; background: var(--night-2); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 7px 10px; }
.audio-tr span { display: inline-block; min-width: 24px; color: #ff8a62; text-transform: uppercase; }
.audio-chips { display: flex; flex-wrap: wrap; gap: 5px; font-size: 10.5px; }
.audio-chips span { padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); }
.audio-chips .c-amber { color: #f0b232; border-color: rgba(240,178,50,.4); }
.audio-chips .c-accent { color: #ff8a62; border-color: rgba(255,138,98,.45); }

/* ---------- Sen'eau : architecture ---------- */
.archi { display: grid; grid-template-columns: .8fr 1.6fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 24px; }
.archi-figures { display: grid; gap: 22px; }
.archi-figures > div { display: grid; gap: 4px; padding-left: 18px; border-left: 2px solid var(--accent); }
.archi-n { font: 400 clamp(48px, 5vw, 68px)/.9 var(--serif); }
.archi-l { color: var(--ink-2); font-size: 15px; }
.archi-diagram { display: grid; gap: 6px; }
.layer { border-radius: 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.layer-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.layer .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.layer .chips span { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.layer-sso { background: var(--ink); border-color: var(--ink); }
.layer-sso .layer-k { color: var(--night-muted); }
.layer-sso .chip-strong { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff; font-weight: 500; }
.layer-front { background: var(--accent-soft); border-color: rgba(232,80,31,.2); }
.layer-split { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.layer-mobile { align-content: start; }
.layer-arrow { text-align: center; color: var(--muted); font-size: 12px; line-height: 1; }

/* ---------- Sen'eau : explorateur de projets ---------- */
.xp { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; margin-bottom: clamp(72px, 10vw, 120px); }
.xp-nav { position: sticky; top: 92px; display: grid; gap: 2px; }
.xp-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px 12px; }
.xp-group:first-child { margin-top: 0; }
.xp-tab { all: unset; box-sizing: border-box; cursor: pointer; padding: 8px 12px; border-radius: 10px; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; position: relative; }
.xp-tab:hover { background: rgba(24,23,19,.05); color: var(--ink); }
.xp-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow); }
.xp-tab[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.xp-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.xp-panels { min-width: 0; position: sticky; top: 92px; }
.xp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.js .xp-panel:not(.is-active) { display: none; }
.js .xp-panel.is-active { animation: panelin .45s var(--ease); }
@keyframes panelin { from { opacity: 0; transform: translateY(8px); } }
.no-xp .xp-panel + .xp-panel { margin-top: 16px; }
.xp-k { color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.xp-panel h3 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.035em; line-height: 1.05; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pill { font-size: 11px; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: rgba(240,178,50,.16); color: var(--amber); font-weight: 400; }
.xp-lede { font-size: 18px; color: var(--ink-2); max-width: 640px; }
.xp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.xp-cols h4 { margin: 0 0 10px; font: italic 400 22px/1.2 var(--serif); }
.xp-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.xp-cols li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.xp-cols li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.xp-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.xp-fig { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 14px; }
.xp-fig span { font: 400 clamp(40px, 4vw, 56px)/1 var(--serif); color: var(--accent); letter-spacing: -.02em; }

.product-hack { padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line-2); }

/* ---------- KAYIA ---------- */
.lab { margin-top: 20px; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: var(--night); color: var(--night-ink); }
.lab-text { display: grid; gap: 14px; }
.lab .client-top .dim, .lab .stack { color: var(--night-muted); }
.lab .tag { color: #ff8a62; }
.lab h3 { font: italic 400 clamp(44px, 5vw, 60px)/1 var(--serif); letter-spacing: 0; }
.lab p:not(.stack) { color: #cfccc2; }
.lab .lab-quote { font: italic 400 clamp(22px, 2.4vw, 28px)/1.25 var(--serif); color: #ff8a62; }
.lab-facts { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lab-facts li { padding: 12px 14px; border-radius: 12px; background: var(--night-2); border: 1px solid rgba(255,255,255,.07); display: grid; gap: 2px; }
.lab-facts b { font: 400 26px/1.1 var(--serif); color: var(--night-ink); }
.lab-facts span { font-size: 12.5px; color: var(--night-muted); }
.lab-video { display: grid; gap: 14px; justify-items: start; }
.video-wrap { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: #e9e7e1; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.video-wrap video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #e9e7e1; }
.video-label { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; pointer-events: none; transition: opacity .3s; }
.video-wrap.is-playing .video-label { opacity: 0; }
.visit-dark { background: transparent; color: var(--night-ink); border-color: rgba(255,255,255,.2); }
.visit-dark:hover { background: var(--night-ink); color: var(--night); border-color: var(--night-ink); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .archi { grid-template-columns: 1fr; }
  .archi-figures { grid-template-columns: repeat(3, 1fr); }
  .xp { grid-template-columns: 220px 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .clients { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .lab { grid-template-columns: 1fr; }
  .xp { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .xp-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .xp-nav::-webkit-scrollbar { display: none; }
  .xp-group { display: none; }
  .xp-panels { position: static; }
  .xp-tab { white-space: nowrap; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; font-size: 14px; flex: none; }
  .xp-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .xp-tab[aria-selected="true"]::before { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 120px; }
  .hero-visual { max-width: 620px; padding-bottom: 120px; }
  .board { left: auto; right: 0; }
  .showcase-hero .browser { transform: none; }
  .product, .agency { grid-template-columns: minmax(0, 1fr); }
  .product:nth-child(even) .product-media { order: 0; }
  .parcours { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; max-width: 360px; }
  .skills { grid-template-columns: 1fr 1fr; }
  .skill, .skill:not(:nth-child(3n+1)) { padding: 24px 0; border-left: 0; }
  .skill:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line-2); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 72px 12px auto 12px; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 10px; box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 16px; font-size: 16px; }
  .nav-links .nav-cta { margin: 6px 0 0; text-align: center; }
  .brand-name { font-size: 14px; }
  .clients { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .archi-figures { grid-template-columns: 1fr; gap: 14px; }
  .layer-split { grid-template-columns: 1fr; }
  .xp-cols { grid-template-columns: 1fr; gap: 20px; }
  .audio-card { width: 58%; left: -2%; padding: 10px 12px 12px; gap: 7px; border-radius: 12px; }
  .wave { height: 40px; }
  .audio-tr + .audio-tr, .audio-chips { display: none; }
  .showcase-audio { padding-bottom: 22%; }
  .lab-facts { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line-2); padding-left: 20px; }
  .skills { grid-template-columns: 1fr; }
  .skill:nth-child(even) { padding-left: 0; border-left: 0; }
  .certs { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-visual { padding-bottom: 0; }
  .board { position: relative; width: 100%; margin-top: 16px; }
  .phone { width: 30%; right: -2%; border-radius: 22px; padding: 5px; }
  .phone .screen { border-radius: 18px; }
  .phone::before { top: 9px; height: 6px; }
  .browser-bar { height: 28px; }
  .url { height: 18px; font-size: 10px; }
}
/* ---------- mobile compact : carrousels, contenu secondaire masqué ---------- */
.rail-head { display: none; }
@media (max-width: 760px) {
  /* rythme général plus serré */
  .section { padding-top: 64px; padding-bottom: 24px; }
  .section-alt { padding-bottom: 64px; margin-top: 40px; }
  .section-head { margin-bottom: 24px; }
  .section-head h2 { font-size: 34px; }
  .section-lede { font-size: 16px; margin-top: 14px; }
  .kicker { margin-bottom: 12px; font-size: 11px; }
  .m-hide { display: none !important; }

  /* carrousel générique */
  .rail {
    display: flex !important; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 86%; scroll-snap-align: start; min-width: 0; }
  .rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--muted); }
  .rail-head .mono { font-size: 11px; }
  .rail-head .mono::after { content: " →"; color: var(--accent); }
  .rail-dots { display: flex; gap: 5px; }
  .rail-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .3s var(--ease), background .3s; }
  .rail-dots i.on { width: 18px; background: var(--accent); }

  /* hero : le terminal laisse la place au diaporama */
  .hero { padding-top: 96px; padding-bottom: 32px; gap: 28px; }
  .hero-title { font-size: 44px; }
  .hero-lede { margin-top: 18px; font-size: 16px; }
  .hero-actions { margin-top: 24px; }
  .eyebrow { margin-bottom: 18px; font-size: 11.5px; }
  .board { display: none; }
  .hero-visual { padding-bottom: 0; }

  /* chiffres : une ligne qui glisse */
  .stats { padding-top: 32px; padding-bottom: 8px; }
  .stats.rail { margin-inline: 0; }
  .stats.rail > .stat { flex-basis: 40%; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); gap: 6px; }
  .stat-n { font-size: 40px; }
  .stat-l { font-size: 12.5px; }
  .stat-l br { display: none; }

  /* produits : une carte par produit */
  .products.rail { gap: 14px; }
  .products.rail > .product { display: flex; flex-direction: column; align-items: stretch; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 20px; }
  .product .product-info { gap: 12px; padding-inline: 4px; }
  .product h3 { font-size: 30px; }
  .product-info > p:not(.stack) { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .product .facts, .product .stack { display: none; }
  .product .visit { margin-top: auto; }
  .products.rail .showcase { padding-bottom: 10%; }
  .products.rail .showcase-audio { padding-bottom: 26%; }
  .products.rail .browser { box-shadow: var(--shadow); }
  .audio-card { width: 62%; }
  .products.rail .showcase-audio .phone { display: none; }
  .products.rail .audio-card { width: 78%; left: 0; }

  /* Sen'eau : chiffres seuls, le schéma est réservé au desktop */
  .archi { padding: 16px; gap: 0; margin-bottom: 16px; }
  .archi-diagram { display: none; }
  .archi-figures { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
  .archi-figures > div { padding-left: 10px; }
  .archi-n { font-size: 36px; }
  .archi-l { font-size: 12px; line-height: 1.35; }
  .xp { margin-bottom: 48px; }
  .xp-panel { padding: 20px; gap: 14px; }
  .xp-panel h3 { font-size: 28px; }
  .xp-lede { font-size: 15.5px; }
  .xp-cols { padding-top: 14px; gap: 16px !important; }
  .xp-cols h4 { font-size: 19px; margin-bottom: 6px; }
  .xp-cols li { font-size: 14.5px; }
  .xp-cols ul { gap: 5px; }
  .xp-foot { padding-top: 14px; }
  .xp-fig span { font-size: 36px; }
  .product-hack { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding-top: 28px; }
  .product-hack .facts { display: none; }
  .product-hack .stack { display: block; }

  /* clients : carrousel, KayTecs sans aperçu */
  .agency { margin-bottom: 28px; }
  .agency .showcase-solo { display: none; }
  .agency .visit { margin-top: 18px; }
  .clients.rail > .client { padding: 10px 10px 20px; }
  .client h3 { font-size: 22px; }
  .client p { font-size: 14.5px; }

  /* KAYIA plus court */
  .lab { padding: 20px; gap: 20px; }
  .lab h3 { font-size: 42px; }
  .lab .lab-quote { font-size: 20px; }
  .lab p:not(.stack) { font-size: 15px; }
  .lab .stack { display: none; }
  .lab-facts { grid-template-columns: repeat(3, 1fr) !important; gap: 6px; }
  .lab-facts li { padding: 10px; }
  .lab-facts b { font-size: 20px; }
  .lab-facts span { font-size: 11px; line-height: 1.3; }

  /* parcours : portrait en vignette */
  .parcours { gap: 20px; }
  .portrait { max-width: 120px; border-radius: 50%; box-shadow: var(--shadow); }
  .portrait img { aspect-ratio: 1; }
  .portrait-cap { display: none; }
  .timeline li { padding-bottom: 22px; }
  .timeline h3 { font-size: 16.5px; }
  .timeline p { font-size: 14.5px; }
  .cert { padding: 14px; }

  /* compétences : cartes qui glissent */
  .skills.rail { border-top: 0; }
  .skills.rail > .skill { flex-basis: 72%; padding: 18px !important; border: 1px solid var(--line-2) !important; border-radius: 16px; background: var(--surface); }
  .skill h3 { font-size: 23px; }
  .skill p { font-size: 14.5px; }
  .langs { margin-top: 18px; font-size: 11px; }

  /* contact */
  .contact { margin-top: 48px; padding-top: 72px; }
  .contact-title { font-size: 42px; }
  .contact-mail { margin-top: 28px; font-size: 26px; }
  .contact-links { margin-top: 24px; }
  .footer { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  /* aperçus : défilement manuel au lieu de l'animation */
  .screen { overflow-y: auto; }
  .scroll-shot { position: static; }
}
