/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-cloud);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--c-royal); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--c-ink); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  max-width: 18ch;
}
.h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--t-lg); margin: 2rem 0 1rem; }
.lead { font-size: var(--t-lg); line-height: 1.55; max-width: 60ch; color: var(--c-ink); }

.section { position: relative; padding: clamp(4.5rem, 10vw, 9rem) clamp(1rem, 5vw, 5rem); max-width: 1320px; margin: 0 auto; }

/* ============ Boutons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.5rem;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--t-md); text-decoration: none;
  transition: transform .35s var(--ease-bounce), box-shadow .35s var(--ease-soft), background .3s;
  cursor: pointer; border: 0;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: scale(.97); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--c-royal), #6A5BFF 60%, var(--c-pink));
  box-shadow: 0 10px 30px -10px rgba(47, 75, 255, .65), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn--glass {
  color: var(--c-ink);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 8px 24px -14px rgba(28,24,70,.45);
}

/* ============ Navigation ============ */
.nav {
  position: fixed; z-index: 50; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1120px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .45rem .5rem .45rem 1.1rem;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.38);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 12px 40px -20px rgba(28,24,70,.5);
}
.nav__brand { display: flex; align-items: center; gap: .55rem; font-family: var(--f-display); font-weight: 800; font-size: .95rem; text-decoration: none; letter-spacing: .01em; }
.nav__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--iri); background-size: 300% 300%; animation: iri 6s linear infinite; box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.nav__links { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { display: block; padding: .55rem .9rem; border-radius: var(--r-pill); text-decoration: none; font-weight: 600; font-size: var(--t-sm); transition: background .25s; }
.nav__links a:hover { background: rgba(255,255,255,.7); }
.nav__doc { min-height: 40px; padding: .5rem 1rem; font-size: var(--t-sm); }
@media (max-width: 860px) { .nav__links { display: none; } }

@keyframes iri { to { background-position: 300% 0; } }

/* ============ Accueil 3D ============ */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; align-items: end;
  background: var(--sky);
  isolation: isolate;
}
.hero__canvas, .hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__fallback { object-fit: contain; object-position: 75% 100%; opacity: 0; transition: opacity .6s; }
.hero.is-fallback .hero__fallback { opacity: 1; }
.hero__copy {
  position: relative; z-index: 2;
  padding: 0 clamp(1rem, 5vw, 5rem) clamp(7rem, 14vh, 9rem);
  max-width: 1320px; width: 100%; margin: 0 auto;
  pointer-events: none;
}
.hero__copy a { pointer-events: auto; }
.hero__hello {
  display: inline-block; margin: 0 0 .8rem;
  font-family: var(--f-display); font-weight: 600; font-size: var(--t-sm);
  padding: .35rem .9rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9);
}
.hero__name {
  margin: 0; font-family: var(--f-display); font-weight: 800;
  font-size: var(--t-hero); line-height: .86; letter-spacing: -0.045em;
  color: var(--c-ink);
}
.hero__line { display: block; }
/* Effet « miroir » : le nom se reflète dans un sol brillant */
.hero__line--mirror { position: relative; animation: shimmer 9s ease-in-out infinite; }
/* reflet « sol miroir » : copie retournée, estompée */
.hero__line--mirror::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 100%; margin-top: -0.2em;
  transform: scaleY(-1); transform-origin: top;
  background-image: linear-gradient(100deg, var(--c-royal) 0%, #6E5BFF 40%, var(--c-pink) 80%, #FFB27A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.28), transparent 55%);
  mask-image: linear-gradient(to top, rgba(0,0,0,.28), transparent 55%);
  pointer-events: none;
  opacity: 0; animation: rise 1s var(--ease-soft) 1.1s forwards;
}
.hero__line--mirror .ch {
  background-image: linear-gradient(100deg, var(--c-royal) 0%, #6E5BFF 40%, var(--c-pink) 80%, #FFB27A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .04em;
}
@keyframes shimmer { 50% { filter: hue-rotate(-22deg) saturate(1.25); } }
.hero__tagline { margin: clamp(1.8rem, 4vw, 3.2rem) 0 1.6rem; position: relative; font-size: var(--t-lg); max-width: 34ch; font-weight: 500; color: var(--c-ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__hint { position: absolute; right: clamp(1rem, 5vw, 5rem); bottom: 5.4rem; margin: 0; font-size: var(--t-xs); color: var(--c-ink-2); opacity: .8; }
@media (hover: none) { .hero__hint { display: none; } }

/* lettres animées à l'arrivée (un seul moment orchestré) */
[data-split] .ch { display: inline-block; transform: translateY(110%) rotate(8deg); opacity: 0; animation: rise .9s var(--ease-soft) forwards; }
@keyframes rise { to { transform: none; opacity: 1; } }

/* Ruban des métiers */
.hero__roles { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: .9rem 0; background: rgba(255,255,255,.32); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); overflow: hidden; }
.marquee { display: flex; width: max-content; gap: 2.2rem; animation: marquee 40s linear infinite; font-family: var(--f-display); font-weight: 600; font-size: var(--t-md); white-space: nowrap; }
.marquee span::after { content: "✦"; margin-left: 2.2rem; color: var(--c-pink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ À propos ============ */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.about__visual { position: relative; aspect-ratio: 1 / 1.08; max-width: 520px; width: 100%; justify-self: center; }
.bubble {
  position: absolute; inset: 0; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.95), rgba(255,255,255,.15) 40%), var(--iri);
  background-size: 100% 100%, 300% 300%;
  animation: iri 12s linear infinite, morph 14s ease-in-out infinite;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), inset -30px -40px 80px rgba(47,75,255,.25), 0 40px 80px -40px rgba(47,75,255,.55);
  overflow: hidden;
}
.bubble img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 94%; width: auto; max-width: none; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(28,24,70,.25)); }
@keyframes morph { 50% { border-radius: 54% 46% 44% 56% / 46% 56% 44% 54%; } }
.about__floaters { list-style: none; margin: 0; padding: 0; }
.about__floaters li {
  position: absolute; padding: .5rem .95rem; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--t-sm); white-space: nowrap;
  background: var(--glass-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 10px 24px -14px rgba(28,24,70,.5);
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-10px); } }
.manifesto { font-family: var(--f-display); font-weight: 600; font-size: var(--t-xl); line-height: 1.2; max-width: 22ch; margin: 2rem 0; background: linear-gradient(90deg, var(--c-royal), var(--c-pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 0; }
.stats div { padding: 1.1rem 1.2rem; border-radius: var(--r-md); background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9); }
.stats dt { font-family: var(--f-display); font-weight: 800; font-size: var(--t-xl); color: var(--c-royal); }
.stats dd { margin: .2rem 0 0; font-size: var(--t-sm); color: var(--c-ink-2); }

/* ============ Projets ============ */
.work { max-width: 1400px; }
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 3rem; }
.work__intro { max-width: 46ch; color: var(--c-ink-2); margin: 0 0 1.4rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1rem; }
.filter {
  min-height: 44px; padding: .55rem 1.05rem; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: 600 var(--t-sm) var(--f-text); color: var(--c-ink);
  background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.95), 0 6px 18px -14px rgba(28,24,70,.6);
  transition: background .25s, color .25s, transform .3s var(--ease-bounce);
}
.filter:hover { transform: translateY(-2px); }
.filter[aria-pressed="true"] { color: #fff; background: var(--c-ink); box-shadow: 0 10px 22px -12px rgba(28,24,70,.8); }
.legend { display: flex; gap: .6rem; margin-bottom: 1.6rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 700; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.badge--real { background: rgba(79,227,208,.22); color: #0B6B60; }
.badge--real::before { background: #18B8A4; }
.badge--concept { background: rgba(183,164,255,.3); color: #4B2FB8; }
.badge--concept::before { background: #7B5CFF; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.card { perspective: 900px; }
.card[hidden] { display: none; }
.card__btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%; height: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.95), 0 24px 50px -32px rgba(28,24,70,.6);
  transform-style: preserve-3d; transition: transform .5s var(--ease-soft), box-shadow .4s;
}
.card__btn:focus-visible { outline: 3px solid var(--c-royal); outline-offset: 4px; }
.card__art {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden;
  background: radial-gradient(120% 120% at 20% 0%, var(--a, #9EC5FF) 0%, var(--b, #FFB4E1) 100%);
}
/* objets de verre dessinés en CSS sur chaque carte */
.card__art .orb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0 8%, rgba(255,255,255,.35) 22%, rgba(255,255,255,.05) 60%); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75), inset -12px -16px 30px rgba(255,255,255,.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .8s var(--ease-soft); }
.card__art .orb--1 { width: 46%; aspect-ratio: 1; right: -6%; top: -12%; }
.card__art .orb--2 { width: 22%; aspect-ratio: 1; left: 10%; bottom: 10%; }
.card__art .ring { position: absolute; width: 38%; aspect-ratio: 1; left: 34%; top: 26%; border-radius: 50%; border: 10px solid rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(255,255,255,.8), inset 0 0 18px rgba(255,255,255,.6); transform: rotateX(62deg); transition: transform .8s var(--ease-soft); }
.card__btn:hover .orb--1 { transform: translate(-8%, 10%); }
.card__btn:hover .orb--2 { transform: translate(12%, -14%); }
.card__btn:hover .ring { transform: rotateX(62deg) rotateZ(90deg) scale(1.08); }
.card__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__kind { position: absolute; left: 14px; top: 14px; z-index: 2; }
.card__kind.badge--real, .card__kind.badge--concept { background: rgba(255,255,255,.82); }
.card__glyph { position: absolute; left: 16px; bottom: 10px; font-family: var(--f-display); font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.4rem); line-height: 1; color: rgba(255,255,255,.92); text-shadow: 0 8px 24px rgba(28,24,70,.25); letter-spacing: -0.04em; }
.card__glyph--long { font-size: clamp(1.8rem, 3.2vw, 2.3rem); }
.card__text { padding: 1.15rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card__client { font-size: var(--t-xs); font-weight: 700; color: var(--c-ink-2); }
.card__title { font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; line-height: 1.25; margin: 0; }
.card__summary { margin: 0; font-size: var(--t-sm); color: var(--c-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__roles { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .5rem; }
.card__roles span { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: var(--r-pill); background: var(--c-mist); }

/* ============ Fiche projet ============ */
.case {
  width: min(880px, calc(100% - 24px)); max-height: calc(100svh - 32px);
  padding: 0; border: 0; border-radius: var(--r-lg); overflow: auto;
  background: rgba(250,250,255,.93); color: var(--c-ink);
  box-shadow: 0 50px 120px -30px rgba(18,15,51,.6);
}
.case::backdrop { background: rgba(28,24,70,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.case[open] { animation: pop .5s var(--ease-bounce); }
@keyframes pop { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.case__close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.1rem; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 1px rgba(28,24,70,.12); }
.case__hero { padding: 2.2rem clamp(1.2rem, 4vw, 2.6rem) 1.8rem; background: radial-gradient(120% 140% at 10% 0%, var(--a) 0%, var(--b) 100%); color: var(--c-ink); }
.case__hero h2 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-xl); line-height: 1.1; margin: .7rem 0 .4rem; max-width: 24ch; }
.case__hero p { margin: 0; font-weight: 600; }
.case__content { padding: 1.6rem clamp(1.2rem, 4vw, 2.6rem) 2.4rem; display: grid; gap: 1.4rem; }
.case__content h3 { font-family: var(--f-display); font-weight: 600; font-size: 1rem; margin: 0 0 .4rem; color: var(--c-royal); }
.case__content p, .case__content li { max-width: 68ch; }
.case__content ul, .case__content ol { margin: 0; padding-left: 1.2rem; }
.case__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.case__idea { padding: 1.1rem 1.3rem; border-radius: var(--r-md); background: rgba(183,164,255,.18); box-shadow: inset 0 0 0 1px rgba(123,92,255,.22); }
.case__note { font-size: var(--t-sm); color: var(--c-ink-2); font-style: italic; }

/* ============ Apps ============ */
.apps__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.4rem; }
.app {
  position: relative; padding: 1.6rem; border-radius: var(--r-lg); overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, var(--a) 0%, var(--b) 100%);
  box-shadow: 0 30px 60px -36px rgba(18,15,51,.8);
  min-height: 320px; display: flex; flex-direction: column;
}
.app__icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.app h3 { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); line-height: 1.1; margin: 1.2rem 0 .6rem; }
.app__kicker { font-weight: 600; margin: 0 0 .8rem; color: rgba(255,255,255,.95); }
.app p { margin: 0 0 1rem; max-width: 40ch; color: rgba(255,255,255,.92); }
.app__status { align-self: flex-start; font-size: var(--t-xs); font-weight: 700; padding: .25rem .7rem; border-radius: var(--r-pill); background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.app__more { margin-top: auto; align-self: flex-start; color: var(--c-ink); background: rgba(255,255,255,.9); }
.app::after { content: ""; position: absolute; width: 220px; aspect-ratio: 1; right: -60px; bottom: -70px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.7), rgba(255,255,255,.08) 55%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); animation: bob 8s ease-in-out infinite; pointer-events: none; }

/* ============ Parcours ============ */
.path__cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 860px) { .path__cols { grid-template-columns: 1fr; } }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px solid transparent; border-image: linear-gradient(var(--c-royal), var(--c-pink)) 1; }
.timeline > li { position: relative; padding: 0 0 1.6rem; }
.timeline > li::before { content: ""; position: absolute; left: calc(-1.4rem - 8px); top: .35rem; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--c-royal); }
.timeline .when { font-size: var(--t-xs); font-weight: 700; color: var(--c-ink-2); }
.timeline .what { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; margin: .1rem 0 .2rem; }
.timeline ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--c-ink-2); font-size: var(--t-sm); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.chips li { padding: .35rem .8rem; border-radius: var(--r-pill); background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(28,24,70,.08); font-size: var(--t-sm); font-weight: 600; }

/* ============ Contact ============ */
.contact__card {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.2rem, 5vw, 4rem);
  border-radius: calc(var(--r-lg) + 10px);
  background: radial-gradient(90% 120% at 50% 0%, #fff 0%, rgba(255,255,255,.4) 60%), var(--iri);
  background-size: 100% 100%, 300% 300%;
  animation: iri 16s linear infinite;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), 0 40px 90px -50px rgba(47,75,255,.8);
}
.contact__card .h2, .contact__card .lead { margin-left: auto; margin-right: auto; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin: 1.8rem 0; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.socials a { display: inline-block; padding: .55rem 1rem; border-radius: var(--r-pill); text-decoration: none; font-weight: 600; font-size: var(--t-sm); background: rgba(255,255,255,.7); }
.socials a:hover { background: #fff; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1rem, 5vw, 5rem) 3rem; max-width: 1320px; margin: 0 auto; font-size: var(--t-sm); color: var(--c-ink-2); }

/* ============ Apparition au défilement (sobre) ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============ Mouvement réduit ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  [data-split] .ch { opacity: 1; transform: none; }
}
