/* ==========================================================================
   Karim Challouf — Portfolio
   Direction : sombre, éditoriale, chaude. 1 accent (ember), serif italique
   pour l'emphase, mono pour les métadonnées.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0b0b0a;
  --bg-2: #111110;
  --card: #161614;
  --card-2: #1c1c19;

  /* Lignes */
  --line: rgba(242, 238, 230, 0.09);
  --line-2: rgba(242, 238, 230, 0.18);

  /* Texte */
  --text: #f2eee6;
  --body: rgba(242, 238, 230, 0.64);
  --muted: rgba(242, 238, 230, 0.4);

  /* Accent */
  --accent: #ff5b24;
  --accent-soft: rgba(255, 91, 36, 0.14);

  /* Typo */
  --f-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Échelle 1.25 */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5625rem;
  --t-2xl: 1.953rem;
  --t-3xl: 2.441rem;

  /* Rayons & espacements */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(96px, 14vw, 180px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
}

/* --------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* Grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: var(--t-sm);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container { width: min(1320px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }

/* --------------------------------------------------------------- Type */
.label {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--accent { color: var(--accent); }

.display {
  font-size: clamp(2.75rem, 7.2vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.h2 {
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.h3 { font-size: var(--t-xl); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.accent { color: var(--accent); }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--body); max-width: 46ch; }
.muted { color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: var(--t-sm);
  color: var(--body);
  white-space: nowrap;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #46d17a; position: relative;
}
.pill .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid #46d17a; animation: ping 2s var(--ease-out) infinite;
}
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(242, 238, 230, 0.06);
  font-size: var(--t-xs);
  color: var(--body);
}

/* --------------------------------------------------------------- Boutons */
.btn {
  --h: 52px;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 26px;
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), transform .2s var(--ease-out);
  isolation: isolate;
  white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: scale(0.97); }
.btn .arrow { transition: transform .35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:hover .arrow--up { transform: translate(3px, -3px); }

.btn--primary { background: var(--accent); color: #140802; }
.btn--primary::before { background: var(--text); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light::before { background: var(--accent); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn--ghost::before { background: var(--text); }
.btn--ghost:hover { color: var(--bg); border-color: var(--text); }
.btn--sm { --h: 42px; padding: 0 18px; font-size: var(--t-sm); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease-out);
  padding-bottom: 2px;
}
.link-arrow:hover { background-size: 100% 1px; }

/* --------------------------------------------------------------- Navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: transform .5s var(--ease-out), background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 11, 10, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: -0.01em; }
.logo__mark {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--text); color: var(--bg);
  font-family: var(--f-serif); font-style: italic; font-size: 1.1rem;
  transition: transform .6s var(--ease-out), background .3s;
}
.logo:hover .logo__mark { transform: rotate(-360deg); background: var(--accent); }
.nav__links { display: flex; gap: 36px; font-size: var(--t-sm); }
.nav__links a { color: var(--body); position: relative; transition: color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: 12px; }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .4s var(--ease-out), top .4s var(--ease-out); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.menu-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-out);
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); visibility: visible; }
.mobile-menu a.big { font-size: clamp(2.5rem, 12vw, 4rem); letter-spacing: -0.04em; line-height: 1.1; display: block; }
.mobile-menu .label { margin-top: 40px; }
.menu-open { overflow: hidden; }

/* --------------------------------------------------------------- Curseur */
.cursor, .cursor-label { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 150; }
.cursor {
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--text); mix-blend-mode: difference;
  transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), opacity .3s;
}
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor-label {
  width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
  background: var(--accent); color: #140802;
  display: grid; place-items: center; text-align: center;
  font-size: var(--t-sm); font-weight: 500; line-height: 1.15;
  transform: scale(0); transition: transform .4s var(--ease-out);
}
.cursor-label.is-on { transform: scale(1); }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor, .cursor-label { display: none; } }

/* --------------------------------------------------------------- Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 56px;
  overflow: hidden;
}
.hero__glow {
  position: absolute; z-index: -1;
  width: 70vw; height: 70vw; max-width: 1000px; max-height: 1000px;
  left: var(--gx, 60%); top: var(--gy, 30%);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 91, 36, 0.22), rgba(255, 91, 36, 0.06) 45%, transparent 70%);
  filter: blur(20px);
  transition: left 1.2s var(--ease-out), top 1.2s var(--ease-out);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 70%);
  opacity: 0.5;
}
.hero__top { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero h1 { max-width: 16ch; }
.hero h1 .serif { color: var(--text); }
.hero__bottom {
  display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 40px; align-items: end;
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero__bottom p { color: var(--body); max-width: 44ch; }
.hero__meta { display: grid; gap: 6px; font-size: var(--t-sm); }
.hero__meta strong { font-weight: 500; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Révélation mot à mot */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i) * 45ms + 150ms); }
.is-loaded .split .w > span { transform: none; }

/* --------------------------------------------------------------- Marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; color: var(--body);
  white-space: nowrap;
}
.marquee__track span i { color: var(--accent); font-style: normal; font-size: 0.7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------- Sections */
.section { padding-block: var(--section); position: relative; }
.section--alt { background: var(--bg-2); }
.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section-head .label { margin-bottom: 20px; display: block; }
.section-head p { color: var(--body); max-width: 42ch; justify-self: end; }

/* --------------------------------------------------------------- Travaux */
.works { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(48px, 6vw, 80px) clamp(20px, 3vw, 40px); }
.work:nth-child(1) { grid-column: 1 / span 7; }
.work:nth-child(2) { grid-column: 8 / span 5; margin-top: clamp(80px, 12vw, 180px); }
.work:nth-child(3) { grid-column: 1 / span 5; margin-top: clamp(40px, 6vw, 80px); }
.work:nth-child(4) { grid-column: 6 / span 7; }
.work a { display: block; }
.work__media {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 4 / 3;
  background: var(--card);
}
.work__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.01);
  transition: transform 1.1s var(--ease-out);
}
.work a:hover .work__media img { transform: scale(1.05); }
.work__media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}
.work__index {
  position: absolute; top: 18px; left: 18px;
  font-family: var(--f-mono); font-size: var(--t-xs);
  padding: 5px 10px; border-radius: 999px;
  background: rgba(11, 11, 10, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text);
}
.work__info { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; align-items: baseline; }
.work__title { font-size: var(--t-xl); letter-spacing: -0.025em; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.work__title .arrow { opacity: 0; transform: translate(-8px, 8px); transition: all .4s var(--ease-out); color: var(--accent); }
.work a:hover .work__title .arrow { opacity: 1; transform: none; }
.work__year { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--muted); }
.work__desc { color: var(--body); margin-top: 6px; max-width: 48ch; }
.work__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

/* --------------------------------------------------------------- Approche (accordéon horizontal) */
.steps { display: flex; gap: 12px; min-height: 440px; }
.step {
  flex: 1; position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: flex .7s var(--ease-out), border-color .4s, background .4s;
  cursor: default;
}
.step:hover, .step:focus-within, .step.is-open { flex: 2.4; border-color: var(--line-2); background: var(--card-2); }
.step__num { font-family: var(--f-serif); font-style: italic; font-size: 4rem; line-height: 1; color: var(--muted); transition: color .4s; }
.step:hover .step__num, .step.is-open .step__num { color: var(--accent); }
.step__body h3 { font-size: var(--t-xl); letter-spacing: -0.02em; font-weight: 500; margin-bottom: 12px; }
.step__body p { color: var(--body); max-width: 38ch; opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .5s var(--ease-out); }
.step:hover .step__body p, .step.is-open .step__body p, .step:focus-within .step__body p { opacity: 1; transform: none; transition-delay: .15s; }
.step__tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; opacity: 0; transition: opacity .4s .2s; }
.step:hover .step__tools, .step.is-open .step__tools { opacity: 1; }

/* --------------------------------------------------------------- Bento compétences */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  position: relative; overflow: hidden;
  transition: border-color .4s;
}
.card:hover { border-color: var(--line-2); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, -100px) var(--my, -100px), rgba(255, 91, 36, 0.09), transparent 60%);
}
.card .label { display: block; margin-bottom: 18px; }
.card h3 { font-size: var(--t-2xl); letter-spacing: -0.03em; font-weight: 500; line-height: 1.1; margin-bottom: 14px; }
.card p { color: var(--body); }
.bento .c-6 { grid-column: span 6; }
.bento .c-4 { grid-column: span 4; }
.bento .c-8 { grid-column: span 8; }
.skill-list { margin-top: 24px; display: grid; gap: 0; }
.skill-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.skill-list li span:last-child { color: var(--muted); font-family: var(--f-mono); font-size: var(--t-xs); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tools span {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: var(--t-sm); transition: background .3s, color .3s, border-color .3s;
}
.tools span:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.lang { display: grid; gap: 18px; margin-top: 24px; }
.lang div { display: grid; gap: 8px; }
.lang .row { display: flex; justify-content: space-between; font-size: var(--t-sm); }
.lang .row span:last-child { color: var(--muted); }
.bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v); background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out) .2s; }
.is-in .bar i { transform: scaleX(1); }

/* --------------------------------------------------------------- À propos */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.portrait {
  position: sticky; top: 110px;
  aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(255, 91, 36, 0.35), transparent 60%),
    linear-gradient(160deg, #24221e, #121110);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait__initials { font-family: var(--f-serif); font-style: italic; font-size: clamp(6rem, 14vw, 11rem); color: var(--text); opacity: 0.9; line-height: 1; }
.portrait__caption {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(11, 11, 10, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: var(--t-sm);
}
.about__text .h2 { margin-bottom: 32px; }
.about__text > p { color: var(--body); font-size: var(--t-lg); line-height: 1.55; margin-bottom: 20px; max-width: 56ch; }
.about__text > p strong { color: var(--text); font-weight: 500; }

.timeline { margin-top: 56px; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 24px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  transition: padding .4s var(--ease-out);
}
.timeline li:hover { padding-left: 12px; }
.timeline li:hover .t-title { color: var(--accent); }
.timeline .t-year { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--muted); }
.timeline .t-title { font-weight: 500; transition: color .3s; }
.timeline .t-sub { color: var(--body); font-size: var(--t-sm); margin-top: 2px; }
.timeline .t-type { font-size: var(--t-xs); color: var(--muted); }

/* --------------------------------------------------------------- Contact */
.contact { padding-block: var(--section) 40px; position: relative; overflow: hidden; }
.contact__glow {
  position: absolute; left: 50%; bottom: -30%; width: 120vw; height: 80vw; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 91, 36, 0.2), transparent 70%);
  z-index: -1; pointer-events: none;
}
.contact__title { font-size: clamp(3rem, 10vw, 10rem); line-height: 0.95; letter-spacing: -0.05em; font-weight: 500; }
.contact__row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 56px; }
.email-btn {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: clamp(1.25rem, 2.6vw, 2rem); letter-spacing: -0.02em;
  padding: 18px 30px; border-radius: 999px;
  border: 1px solid var(--line-2);
  transition: background .35s var(--ease-out), color .35s, border-color .35s;
}
.email-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.email-btn .copy { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.email-btn:hover .copy { color: var(--bg); opacity: .6; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px;
  margin-top: clamp(80px, 12vw, 160px); padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: var(--t-sm); color: var(--muted);
}
.footer a:hover { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 160;
  transform: translate(-50%, calc(100% + 48px)); opacity: 0;
  background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: 999px; font-size: var(--t-sm); font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  transition: transform .5s var(--ease-out), opacity .3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* --------------------------------------------------------------- Révélations */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(12% 0 0 0 round var(--r-lg)); transition: clip-path 1.3s var(--ease-out); }
[data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round var(--r-lg)); }

/* Transition de page */
.page-veil {
  position: fixed; inset: 0; z-index: 140; background: var(--bg);
  pointer-events: none; opacity: 1; transition: opacity .6s var(--ease-out);
}
.is-loaded .page-veil { opacity: 0; }
.is-leaving .page-veil { opacity: 1; transition: opacity .35s var(--ease-in); }

/* ==========================================================================
   ÉTUDE DE CAS
   ========================================================================== */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: transparent; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

.case-hero { padding: 150px 0 0; }
.back { display: inline-flex; align-items: center; gap: 10px; color: var(--body); font-size: var(--t-sm); margin-bottom: 48px; transition: color .2s, gap .3s var(--ease-out); }
.back:hover { color: var(--text); gap: 14px; }
.case-hero .label { display: block; margin-bottom: 24px; }
.case-hero h1 { font-size: clamp(2.75rem, 6.4vw, 6.25rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 500; max-width: 15ch; }
.case-hero .lead { margin-top: 28px; max-width: 52ch; }
.case-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line);
}
.case-meta dt { margin-bottom: 8px; }
.case-meta dd { font-size: var(--t-sm); color: var(--text); line-height: 1.5; }
.case-cover { margin-top: 64px; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--card); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }

.case-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(80px, 10vw, 140px) 40px; }
.toc { position: sticky; top: 110px; align-self: start; }
.toc .label { display: block; margin-bottom: 16px; }
.toc a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; font-size: var(--t-sm); color: var(--muted);
  transition: color .3s;
}
.toc a::before { content: ""; width: 12px; height: 1px; background: currentColor; transition: width .4s var(--ease-out), background .3s; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); }
.toc a.is-active::before { width: 28px; background: var(--accent); }

.case-section { padding-bottom: clamp(72px, 9vw, 120px); scroll-margin-top: 100px; }
.case-section > .label { display: block; margin-bottom: 18px; }
.case-section h2 { font-size: clamp(1.875rem, 3.4vw, 3rem); letter-spacing: -0.035em; line-height: 1.08; font-weight: 500; margin-bottom: 28px; max-width: 22ch; }
.case-section > p, .case-section .prose p { color: var(--body); font-size: 1.0625rem; line-height: 1.7; max-width: 64ch; margin-bottom: 18px; }
.case-section > p strong, .prose p strong { color: var(--text); font-weight: 500; }

.problem {
  margin: 36px 0 8px; padding: 36px clamp(24px, 4vw, 48px);
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), transparent 80%);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.25; letter-spacing: -0.01em;
}

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 36px 0; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.fact b { display: block; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; margin-bottom: 10px; }
.fact span { color: var(--body); font-size: var(--t-sm); }
.fact--accent b { color: var(--accent); }

.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.insight { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.insight q { font-family: var(--f-serif); font-style: italic; font-size: 1.375rem; line-height: 1.3; quotes: "« " " »"; }
.insight p { color: var(--body); font-size: var(--t-sm); }
.insight .label { margin-top: auto; }

.figure { margin: 40px 0; }
.figure__frame { border-radius: var(--r-lg); overflow: hidden; background: var(--card); border: 1px solid var(--line); position: relative; }
.figure__frame img { width: 100%; }
.figure figcaption { margin-top: 14px; font-size: var(--t-sm); color: var(--muted); display: flex; gap: 12px; }
.figure figcaption::before { content: "↳"; color: var(--accent); }

.directions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.direction { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; transition: border-color .3s, transform .5s var(--ease-out); }
.direction:hover { border-color: var(--line-2); transform: translateY(-4px); }
.direction.is-chosen { border-color: var(--accent); }
.direction svg { width: 100%; height: auto; aspect-ratio: 1; background: #ece6da; border-radius: 10px; margin-bottom: 18px; }
.direction svg path, .direction svg ellipse, .direction svg rect, .direction svg circle, .direction svg line { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 2.4s var(--ease-out); }
.is-in .direction svg path, .is-in .direction svg ellipse, .is-in .direction svg rect, .is-in .direction svg circle, .is-in .direction svg line { stroke-dashoffset: 0; }
.direction h4 { font-weight: 500; display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.direction p { color: var(--body); font-size: var(--t-sm); }
.chosen-badge { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.features { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.features li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.features li > span { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--accent); padding-top: 4px; }
.features h4 { font-weight: 500; margin-bottom: 4px; }
.features p { color: var(--body); font-size: 0.9375rem; max-width: 60ch; }

/* Avant / après */
.compare {
  --pos: 50%;
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); margin: 40px 0 14px; user-select: none; touch-action: pan-y;
  background: var(--card);
}
.compare__pane { position: absolute; inset: 0; display: grid; place-items: center; }
.compare__pane--after { clip-path: inset(0 0 0 var(--pos)); }
.compare__tag { position: absolute; top: 18px; font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; padding: 6px 12px; border-radius: 999px; background: rgba(11, 11, 10, 0.6); backdrop-filter: blur(8px); }
.compare__pane--before .compare__tag { left: 18px; }
.compare__pane--after .compare__tag { right: 18px; color: var(--accent); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--text); transform: translateX(-1px); pointer-events: none; }
.compare__handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 1.1rem; letter-spacing: 2px; font-weight: 600;
}
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

.learnings { display: grid; gap: 12px; margin-top: 32px; }
.learnings li { display: flex; gap: 20px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.learnings li b { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.75rem; color: var(--accent); line-height: 1; min-width: 32px; }
.learnings h4 { font-weight: 500; margin-bottom: 4px; }
.learnings p { color: var(--body); font-size: 0.9375rem; }

.next {
  display: block; position: relative; overflow: hidden;
  border-top: 1px solid var(--line);
  padding: clamp(80px, 12vw, 160px) 0;
}
.next .label { display: block; margin-bottom: 20px; }
.next__title { font-size: clamp(3rem, 9vw, 8.5rem); letter-spacing: -0.05em; line-height: 0.95; font-weight: 500; display: flex; align-items: center; gap: 0.25em; transition: color .4s; }
.next__title .arrow { color: var(--accent); transition: transform .6s var(--ease-out); }
.next:hover .next__title .arrow { transform: translateX(16px); }
.next__img {
  position: absolute; right: var(--gutter); top: 50%; width: min(34vw, 460px); aspect-ratio: 4 / 3;
  border-radius: var(--r-md); overflow: hidden;
  transform: translateY(-40%) rotate(4deg) scale(0.85); opacity: 0;
  transition: opacity .5s, transform .8s var(--ease-out);
  pointer-events: none;
}
.next:hover .next__img { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }
.next__img img { width: 100%; height: 100%; object-fit: cover; }

/* Design system (Sana) */
.ds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 36px 0; }
.ds__card { background: #f4f6fb; color: #0f1729; border-radius: var(--r-md); padding: 24px; }
.ds__card .label { color: #5b6784; display: block; margin-bottom: 16px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatches div { aspect-ratio: 1; border-radius: 10px; position: relative; }
.swatches small { position: absolute; left: 6px; bottom: 5px; font-family: var(--f-mono); font-size: 9px; }
.typescale { display: grid; gap: 6px; }
.typescale div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #dfe4ef; padding-bottom: 6px; }
.typescale small { font-family: var(--f-mono); font-size: 10px; color: #5b6784; }
.ds-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-btn { padding: 14px 22px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.ds-field { margin-top: 14px; border: 2px solid #2b5bd7; border-radius: 12px; padding: 12px 14px; font-size: 15px; display: flex; justify-content: space-between; }
.ds-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ds-chips span { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .hero__bottom { grid-template-columns: 1fr 1fr; }
  .hero__actions { grid-column: 1 / -1; }
  .steps { flex-direction: column; min-height: 0; }
  .step { min-height: 0; gap: 24px; }
  .step__body p, .step__tools { opacity: 1; transform: none; }
  .step__num { font-size: 2.5rem; }
  .about { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; max-width: 420px; }
  .case-body { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .next__img { display: none; }
}
@media (max-width: 860px) {
  .nav__links, .nav__right .btn { display: none; }
  .burger { display: block; }
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .works { grid-template-columns: 1fr; }
  .work:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
    .bento .c-6, .bento .c-4, .bento .c-8 { grid-column: 1 / -1; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .facts, .insights, .directions { grid-template-columns: 1fr; }
  .ds { grid-template-columns: 1fr; }
  .compare { aspect-ratio: 4 / 5; }
}
@media (max-width: 560px) {
  .hero__bottom { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .email-btn { width: 100%; justify-content: space-between; padding: 18px 22px; }
  .case-cover { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .split .w > span { transform: none; }
}

/* Grille d'écrans dans les figures */
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: clamp(24px, 5vw, 56px); }
@media (max-width: 860px) { .screens { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hero .pill { white-space: normal; line-height: 1.4; } }

/* ==========================================================================
   COMPOSANTS UX / UI — maquettes, parcours, flows, wireframes
   ========================================================================== */

/* Portrait réel */
.portrait img { object-position: 50% 20%; filter: saturate(0.92) contrast(1.02); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 11, 10, 0.55)); pointer-events: none; }
.portrait__caption { z-index: 1; }
.avatar-pill { padding-left: 5px; }
.avatar-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }

/* Galerie d'écrans (défilement horizontal + glisser) */
.gallery {
  display: flex; gap: 28px; overflow-x: auto; overscroll-behavior-x: contain;
  margin-top: 40px; padding: 8px 4px 24px;
  scroll-snap-type: x proximity; cursor: grab;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
          mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery.is-dragging * { pointer-events: none; user-select: none; }
.shot { flex: 0 0 auto; width: 248px; scroll-snap-align: start; }
.shot--tab { width: 300px; }
.shot figcaption { margin-top: 18px; font-size: var(--t-sm); color: var(--body); line-height: 1.5; }
.shot figcaption b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.shot figcaption b span { font-family: var(--f-mono); font-size: 10px; color: var(--accent); margin-right: 8px; font-weight: 400; }
.gallery-hint { font-size: var(--t-sm); color: var(--muted); margin-top: 4px; }

/* Téléphone */
.ph {
  --bg: #fff; --ink: #111; --sf: #f2f2f2; --mt: #777; --ac: #ff5b24; --ac-ink: #fff; --ln: rgba(0, 0, 0, 0.09);
  width: 248px; aspect-ratio: 9 / 19; border-radius: 40px; padding: 8px;
  background: #0d0d0c;
  box-shadow: 0 40px 60px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform .6s var(--ease-out);
}
.shot:hover .ph { transform: translateY(-8px); }
.ph--tab { width: 300px; aspect-ratio: 3 / 4; border-radius: 28px; padding: 10px; }
.ph__s {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 32px; background: var(--bg); color: var(--ink);
  font-family: var(--f-sans); font-size: 11px; line-height: 1.35; letter-spacing: -0.005em;
  display: flex; flex-direction: column; gap: 10px;
  padding: 36px 14px 14px;
}
.ph__s::before { content: ""; position: absolute; top: 9px; left: 50%; width: 72px; height: 20px; border-radius: 12px; background: #0d0d0c; transform: translateX(-50%); }
.ph--tab .ph__s { border-radius: 19px; padding: 22px; font-size: 12px; gap: 12px; }
.ph--tab .ph__s::before { display: none; }
.ph__s[dir="rtl"] { font-family: "Geist", "Geeza Pro", "Noto Sans Arabic", sans-serif; }

.ph-eb { font-size: 10px; color: var(--mt); }
.ph-h { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.ph--tab .ph-h { font-size: 26px; }
.ph-h2 { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.ph-mt { color: var(--mt); }
.ph-big { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.ph-ac { color: var(--ac); }
.ph-card { background: var(--sf); border-radius: 14px; padding: 12px; display: grid; gap: 6px; }
.ph-card--line { background: transparent; border: 1px solid var(--ln); }
.ph-card--ac { background: var(--ac); color: var(--ac-ink); }
.ph-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ph-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-btn { background: var(--ac); color: var(--ac-ink); border-radius: 999px; padding: 11px 14px; text-align: center; font-weight: 600; font-size: 12px; }
.ph-btn--ghost { background: transparent; border: 1px solid var(--ln); color: var(--ink); }
.ph-btn--ink { background: var(--ink); color: var(--bg); }
.ph-btn--lg { padding: 18px; border-radius: 16px; font-size: 15px; text-align: start; }
.ph-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.ph-chip { padding: 5px 9px; border-radius: 999px; border: 1px solid var(--ln); font-size: 10px; background: var(--sf); }
.ph-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ph-input { border: 1px solid var(--ln); background: var(--sf); border-radius: 12px; padding: 10px 12px; color: var(--mt); display: flex; justify-content: space-between; }
.ph-input.focus { border: 2px solid var(--ac); color: var(--ink); }
.ph-list { display: grid; gap: 8px; }
.ph-li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--ln); }
.ph-li:last-child { border-bottom: 0; }
.ph-check { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--ln); flex: 0 0 auto; display: grid; place-items: center; font-size: 10px; }
.ph-check.on { background: var(--ac); border-color: var(--ac); color: var(--ac-ink); }
.ph-ico { width: 30px; height: 30px; border-radius: 10px; background: var(--sf); display: grid; place-items: center; flex: 0 0 auto; font-size: 13px; }
.ph-bar { height: 5px; border-radius: 3px; background: var(--ln); overflow: hidden; }
.ph-bar i { display: block; height: 100%; width: var(--v); background: var(--ac); border-radius: inherit; }
.ph-ring {
  --v: 60; width: 124px; aspect-ratio: 1; border-radius: 50%; margin: 6px auto;
  background: conic-gradient(var(--ac) calc(var(--v) * 1%), var(--ln) 0);
  display: grid; place-items: center; position: relative;
}
.ph-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--bg); }
.ph-ring > * { position: relative; text-align: center; }
.ph-tab { margin: auto -14px -14px; padding: 10px 14px 16px; display: flex; justify-content: space-around; border-top: 1px solid var(--ln); font-size: 9px; color: var(--mt); background: var(--bg); }
.ph-tab span { display: grid; justify-items: center; gap: 3px; }
.ph-tab span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: var(--ln); }
.ph-tab .on { color: var(--ink); font-weight: 600; }
.ph-tab .on::before { background: var(--ac); }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); display: inline-block; flex: 0 0 auto; }
.ph-tog { width: 30px; height: 18px; border-radius: 9px; background: var(--ln); position: relative; flex: 0 0 auto; }
.ph-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ph-tog.on { background: var(--ac); }
.ph-tog.on::after { left: 14px; }
.ph-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; border-radius: 34px; background: var(--sf); border: 1px solid var(--ln); margin: 0 14px; }
.ph-seats span { aspect-ratio: 1; border-radius: 8px; background: var(--ln); display: grid; place-items: center; font-weight: 600; font-size: 11px; }
.ph-seats .free { background: var(--bg); border: 1px solid var(--ln); }
.ph-seats .sel { background: var(--ac); color: var(--ac-ink); }
.ph-seats .gap { background: transparent; }
.ph-qr {
  width: 118px; aspect-ratio: 1; margin: 4px auto; border-radius: 10px; border: 8px solid #fff; outline: 1px solid var(--ln);
  background:
    linear-gradient(90deg, #fff 0 0) 0 0 / 0 0,
    repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 0 / 17px 17px;
  position: relative;
}
.ph-qr::before, .ph-qr::after { content: ""; position: absolute; width: 30px; height: 30px; border: 6px solid #111; background: #fff; box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 9px #111; }
.ph-qr::before { top: 0; left: 0; }
.ph-qr::after { bottom: 0; right: 0; }
.ph-map {
  position: relative; flex: 1; min-height: 140px; margin: 0 -14px; overflow: hidden;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.05) 0 18%, transparent 19%),
    repeating-linear-gradient(35deg, transparent 0 26px, rgba(255,255,255,.035) 26px 27px),
    repeating-linear-gradient(-55deg, transparent 0 40px, rgba(255,255,255,.03) 40px 41px),
    var(--map, #1c2230);
}
.ph-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-pin { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; }
.ph-pin i { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ac); box-shadow: 0 4px 10px rgba(0,0,0,.4); display: block; }
.ph-pin.alt i { background: var(--sf); border: 2px solid var(--ac); }
.ph-pin b { position: absolute; top: 4px; font-size: 9px; color: var(--ac-ink); }
.ph-sheet { margin: 0 -14px -14px; padding: 14px; border-radius: 22px 22px 0 0; background: var(--sf); display: grid; gap: 9px; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.ph-sheet::before { content: ""; width: 34px; height: 4px; border-radius: 2px; background: var(--ln); justify-self: center; margin-top: -4px; }
.ph-photo { border-radius: 12px; aspect-ratio: 16 / 9; background: var(--photo, linear-gradient(160deg, #e9a46a, #6b3f5e 60%, #231a2c)); position: relative; overflow: hidden; }
.ph-toast { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-size: 10.5px; }
.ph-badge { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 9px; font-weight: 600; background: var(--ac); color: var(--ac-ink); }
.ph-steps { display: flex; gap: 4px; }
.ph-steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--ln); }
.ph-steps i.on { background: var(--ac); }

/* Thèmes projet */
.th-nawa  { --bg: #f6f3ec; --ink: #1b2a1d; --sf: #fff; --mt: #6c6a62; --ac: #4f7a45; --ac-ink: #fff; --ln: rgba(27, 42, 29, 0.1); }
.th-rihla { --bg: #faf7f0; --ink: #1d1a14; --sf: #fff; --mt: #7a7468; --ac: #f2b632; --ac-ink: #1d1a14; --ln: rgba(29, 26, 20, 0.1); }
.th-khaima { --bg: #15121c; --ink: #f4ede4; --sf: #221d2b; --mt: #9a90a6; --ac: #f08a4b; --ac-ink: #1a0d05; --ln: rgba(244, 237, 228, 0.1); --map: #1d1826; }
.th-sana  { --bg: #f4f6fb; --ink: #0f1729; --sf: #fff; --mt: #5b6784; --ac: #2b5bd7; --ac-ink: #fff; --ln: rgba(15, 23, 41, 0.1); }

/* Wireframes basse fidélité */
.wf-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.wf-item { width: 150px; }
.wf {
  aspect-ratio: 9 / 18; border: 1.5px solid var(--line-2); border-radius: 24px;
  padding: 18px 12px 12px; display: flex; flex-direction: column; gap: 7px;
  background: repeating-linear-gradient(0deg, transparent 0 11px, rgba(242,238,230,.025) 11px 12px);
}
.wf i { display: block; height: 7px; border-radius: 4px; background: rgba(242, 238, 230, 0.18); }
.wf i.s { width: 45%; } .wf i.m { width: 70%; } .wf i.h { height: 12px; width: 80%; background: rgba(242, 238, 230, 0.3); }
.wf b { display: block; height: var(--h, 40px); border: 1.5px dashed rgba(242, 238, 230, 0.22); border-radius: 8px; flex: 0 0 auto; }
.wf b.c { border-radius: 50%; width: var(--h); margin: 4px auto; }
.wf u { display: block; height: 20px; border-radius: 999px; background: rgba(242, 238, 230, 0.32); margin-top: auto; }
.wf-item p { font-size: var(--t-xs); color: var(--muted); margin-top: 12px; line-height: 1.5; }
.wf-item p b { color: var(--body); font-weight: 500; display: block; }

/* Persona */
.persona { display: grid; grid-template-columns: 1fr 1.5fr; margin-top: 36px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); overflow: hidden; }
.persona__id { padding: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.persona__who { display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--f-serif); font-style: italic; font-size: 1.5rem; flex: 0 0 auto; }
.persona__who b { display: block; font-weight: 500; font-size: 1.0625rem; }
.persona__who span { font-size: var(--t-sm); color: var(--muted); }
.persona__id q { font-family: var(--f-serif); font-style: italic; font-size: 1.3rem; line-height: 1.3; quotes: "« " " »"; }
.persona__cols { display: grid; grid-template-columns: 1fr 1fr; }
.persona__cols > div { padding: 28px; }
.persona__cols > div + div { border-left: 1px solid var(--line); }
.persona__cols .label { display: block; margin-bottom: 10px; }
.persona__cols li { font-size: 0.9375rem; color: var(--body); padding: 7px 0; border-bottom: 1px solid var(--line); }
.persona__cols li:last-child { border-bottom: 0; }

/* Carte d'expérience (journey map) */
.journey { margin-top: 36px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); overflow-x: auto; cursor: grab; }
.journey__grid { display: grid; grid-template-columns: 112px repeat(5, minmax(150px, 1fr)); min-width: 880px; }
.journey__grid > div { padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-size: var(--t-sm); color: var(--body); line-height: 1.45; }
.journey__grid > .jl { border-left: 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.journey__grid > .jh { color: var(--text); font-weight: 500; background: rgba(242, 238, 230, 0.03); }
.journey__grid > .jh small { display: block; font-family: var(--f-mono); font-size: 10px; color: var(--accent); font-weight: 400; margin-bottom: 2px; }
.journey__grid > .jo { color: var(--accent); }
.journey__grid > :nth-last-child(-n + 6) { border-bottom: 0; }
.jemo { grid-column: 2 / -1; position: relative; height: 120px; padding: 0 !important; }
.jemo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.jemo svg path { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 2000; stroke-dashoffset: 2000; transition: stroke-dashoffset 2.2s var(--ease-out); }
.is-in .jemo svg path { stroke-dashoffset: 0; }
.jemo span { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 14px; }

/* Flow utilisateur */
.flow {
  margin-top: 36px; padding: 32px 28px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: radial-gradient(rgba(242,238,230,.08) 1px, transparent 1px) 0 0 / 18px 18px, var(--card);
  display: flex; align-items: center; overflow-x: auto; cursor: grab;
}
.flow > * { flex: 0 0 auto; }
.fn { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: var(--t-sm); max-width: 150px; text-align: center; line-height: 1.35; }
.fn small { display: block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fn--start { border-radius: 999px; background: var(--text); color: var(--bg); border-color: var(--text); padding: 10px 16px; }
.fn--end { border-radius: 999px; background: var(--accent); color: #140802; border-color: var(--accent); padding: 10px 16px; font-weight: 500; }
.fn--q { border-style: dashed; border-color: var(--accent); background: transparent; }
.fa { width: 34px; height: 1px; background: var(--line-2); position: relative; }
.fa::after { content: ""; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left: 6px solid var(--line-2); border-right: 0; }
.fbranch { display: grid; gap: 14px; }
.fbranch > div { display: flex; align-items: center; }
.fbranch em { font-style: normal; font-family: var(--f-mono); font-size: 10px; color: var(--accent); width: 34px; text-align: center; }

/* Résultats de tests (constats) */
.findings { margin-top: 32px; border-top: 1px solid var(--line); }
.findings li { display: grid; grid-template-columns: 1.3fr 92px 1.3fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--body); align-items: start; }
.findings li.head { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 0; }
.findings li b { color: var(--text); font-weight: 500; }
.sev { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 6px; justify-self: start; }
.sev--hi { color: #ff8a7a; background: rgba(255, 110, 90, 0.12); }
.sev--md { color: #f2c14e; background: rgba(242, 193, 78, 0.12); }
.sev--lo { color: var(--body); background: rgba(242, 238, 230, 0.08); }

/* Classement (tri de cartes) */
.ranking { margin-top: 32px; display: grid; gap: 12px; }
.ranking li { display: grid; grid-template-columns: 180px 1fr 44px; gap: 16px; align-items: center; font-size: var(--t-sm); }
.ranking li span:last-child { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--muted); text-align: right; }
.ranking .bar { height: 8px; }
.ranking .bar i { background: var(--accent); }

/* Architecture d'information */
.ia { margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative; }
.ia > div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; background: var(--card); }
.ia h4 { font-weight: 500; margin-bottom: 10px; display: flex; justify-content: space-between; }
.ia h4 small { font-family: var(--f-mono); font-size: 10px; color: var(--accent); font-weight: 400; }
.ia li { font-size: var(--t-sm); color: var(--body); padding: 5px 0; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .persona, .persona__cols { grid-template-columns: 1fr; }
  .persona__id { border-right: 0; border-bottom: 1px solid var(--line); }
  .persona__cols > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .findings li { grid-template-columns: 1fr; gap: 8px; }
  .findings li.head { display: none; }
  .ia { grid-template-columns: 1fr 1fr; }
  .ranking li { grid-template-columns: 110px 1fr 36px; }
}

/* Empêche les contenus larges (galeries, flows, tableaux) d'élargir la colonne */
.case-body > article, .case-section, .gallery, .flow, .journey { min-width: 0; max-width: 100%; }
.works > *, .bento > *, .about > * { min-width: 0; }

/* ==========================================================================
   PHOTOS — contexte, mises en situation, vignettes dans les maquettes
   ========================================================================== */
.photos { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin: 36px 0; }
.photos figure { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--card); }
.photos figure:first-child { grid-row: span 2; }
.photos img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform 1.2s var(--ease-out); }
.photos figure:first-child img { aspect-ratio: auto; min-height: 100%; }
.photos figure:hover img { transform: scale(1.04); }
.photos figcaption {
  position: absolute; left: 12px; bottom: 12px; right: 12px; width: fit-content;
  padding: 6px 12px; border-radius: 999px; font-size: var(--t-xs);
  background: rgba(11, 11, 10, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.insitu { position: relative; margin: 40px 0 14px; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--card); }
.insitu > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 1.6s var(--ease-out); }
.insitu:hover > img { transform: scale(1.06); }
.insitu::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,10,.55), rgba(11,11,10,.05) 55%, rgba(11,11,10,.35)); pointer-events: none; }
.insitu .ph, .insitu .ph--tab { position: absolute; z-index: 1; right: 7%; top: 50%; transform: translateY(-50%) scale(var(--s, .8)) rotate(-3deg); transform-origin: right center; }
.insitu__txt { position: absolute; z-index: 1; left: clamp(20px, 4vw, 40px); bottom: clamp(20px, 4vw, 40px); max-width: 44%; }
.insitu__txt .label { color: var(--accent); display: block; margin-bottom: 8px; }
.insitu__txt p { font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; }
.insitu__txt p em { font-family: var(--f-serif); font-weight: 400; }

.ph-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-photo span { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-weight: 600; }
.ph-thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 9px; object-fit: cover; display: block; }
.ph-th { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.ph-avs { display: flex; align-items: center; }
.ph-avs img, .ph-avs b { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--sf); margin-right: -7px; }
.ph-avs b { display: grid; place-items: center; background: var(--ac); color: var(--ac-ink); font-size: 10px; }
.ph-avs .ph-chip { margin-left: 14px; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.photo-credit { font-size: var(--t-xs); color: var(--muted); }

@media (max-width: 860px) {
  .photos { grid-template-columns: 1fr 1fr; }
  .photos figure:first-child { grid-column: 1 / -1; grid-row: auto; }
  .photos figure:first-child img { aspect-ratio: 16 / 10; }
  .insitu { aspect-ratio: 4 / 5; }
  .insitu .ph, .insitu .ph--tab { right: 50%; top: 44%; transform: translate(50%, -50%) scale(var(--sm, .62)); transform-origin: center; }
  .insitu__txt { max-width: none; right: 20px; }
  .insitu::after { background: linear-gradient(180deg, rgba(11,11,10,.1) 40%, rgba(11,11,10,.75)); }
}
@media (max-width: 860px) {
  .insitu .ph, .insitu .ph--tab { top: 36%; transform: translate(50%, -50%) scale(var(--sm, .52)); }
  .insitu__txt { z-index: 2; }
}
