/* ---------- Polices (identiques au portfolio, hébergées localement) ---------- */
@font-face {
  font-family: "Inter Variable";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Thème : palette reprise du portfolio (sombre par défaut) ---------- */
:root {
  --font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, monospace;

  --background: oklch(14.5% .005 285);
  --surface: oklch(17.5% .006 285);
  --surface-elevated: oklch(21% .007 285);
  --foreground: oklch(96% .005 90);
  --muted-foreground: oklch(66% .01 285);
  --border: oklch(100% 0 0 / .08);
  --border-strong: oklch(100% 0 0 / .18);
  --grid-line: oklch(100% 0 0 / .04);

  --brand: oklch(52% .19 26);
  --brand-bright: oklch(60% .22 26);
  --brand-dim: oklch(38% .15 26);
  --on-brand: oklch(98% .005 90);

  --radius: .75rem;
  --shadow: 0 1px 0 oklch(100% 0 0 / .04) inset, 0 8px 24px -12px oklch(0% 0 0 / .6);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --background: oklch(98% .004 90);
  --surface: oklch(100% 0 0);
  --surface-elevated: oklch(96% .005 90);
  --foreground: oklch(20% .006 285);
  --muted-foreground: oklch(48% .01 285);
  --border: oklch(0% 0 0 / .09);
  --border-strong: oklch(0% 0 0 / .2);
  --grid-line: oklch(0% 0 0 / .045);
  --shadow: 0 1px 2px oklch(0% 0 0 / .05), 0 8px 24px -14px oklch(0% 0 0 / .25);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, p { margin: 0; }
::selection { background: var(--brand); color: var(--on-brand); }

.ico {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; border-radius: var(--radius); }

/* ---------- Fond : grille discrète + halo de la couleur de marque ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 2rem 2rem;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 75%);
}
.bg::after {
  content: "";
  position: absolute; top: -18rem; left: 50%;
  width: 46rem; height: 28rem; max-width: 140vw;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in oklch, var(--brand) 32%, transparent), transparent);
  filter: blur(40px);
  opacity: .8;
}
:root[data-theme="light"] .bg::after { opacity: .35; }

/* ---------- Barre d’outils ---------- */
.toolbar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: flex; gap: 8px;
  z-index: 5;
}
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--foreground); border-color: var(--border-strong); background: var(--surface-elevated); }
.icon-btn:active { transform: scale(.95); }
.ico-sun { display: block; }
.ico-moon { display: none; }
:root[data-theme="light"] .ico-sun { display: none; }
:root[data-theme="light"] .ico-moon { display: block; }

/* ---------- Mise en page ---------- */
.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px calc(40px + env(safe-area-inset-bottom));
}

/* ---------- Profil ---------- */
.profile { text-align: center; margin-bottom: 24px; }
.cover {
  aspect-ratio: 600 / 244;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar {
  width: 104px; height: 104px;
  margin: -52px auto 16px;
  position: relative;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-elevated);
  color: var(--foreground);
  font: 600 32px/1 var(--font-mono);
  letter-spacing: -.02em;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 5px var(--background), 0 0 0 6px var(--brand), 0 0 40px -6px color-mix(in oklch, var(--brand) 60%, transparent);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; }
.bio { margin: 6px auto 0; max-width: 40ch; color: var(--muted-foreground); text-wrap: balance; }

.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: color .15s, border-color .15s, background .15s, transform .2s;
}
.socials a:hover { color: var(--on-brand); background: var(--brand); border-color: var(--brand-bright); transform: translateY(-2px); }

/* ---------- À propos ---------- */
.about {
  display: grid; gap: 12px;
  margin-bottom: 24px;
  text-align: center;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) .17s both;
}
.role {
  padding: 20px 18px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.role header { display: grid; justify-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.role h2 { margin: 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
.thumb.emoji { width: 44px; height: 44px; font-size: 1.3rem; line-height: 1; color: inherit; }

.clients li {
  display: grid; justify-items: center; gap: 2px;
  padding: 14px 0;
}
.clients li + li { border-top: 1px solid var(--border); }
.clients strong { font-weight: 600; letter-spacing: -.01em; }
.clients span { color: var(--muted-foreground); font-size: .88rem; text-wrap: balance; }

/* Ligne client avec bouton vers son site */
.site-btn {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  font: 500 .75rem var(--font-mono);
  transition: background .15s, border-color .15s, color .15s;
}
.site-btn .ico { width: 14px; height: 14px; color: var(--brand-bright); transition: transform .2s, color .15s; }
.site-btn:hover { background: var(--brand); border-color: var(--brand-bright); color: var(--on-brand); }
.site-btn:hover .ico { color: var(--on-brand); transform: translate(2px, -2px); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 18px 0 18px; }
.chips a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  font: 500 .8rem var(--font-mono);
  transition: background .15s, border-color .15s, color .15s, transform .2s;
}
.chips a .ico { width: 16px; height: 16px; color: var(--brand-bright); transition: color .15s, transform .2s; }
.chips a .go { width: 14px; height: 14px; color: var(--muted-foreground); }
.chips a:hover { background: var(--brand); border-color: var(--brand-bright); color: var(--on-brand); transform: translateY(-2px); }
.chips a:hover .ico { color: var(--on-brand); }
.chips a:hover .go { transform: translate(2px, -2px); }

/* Écrans larges : cartes alignées à gauche, un label par ligne (nom | artistes) */
@media (min-width: 600px) {
  .about { text-align: left; }
  .role { padding: 16px 18px 6px; }
  .role header { display: flex; align-items: center; justify-items: normal; gap: 12px; padding-bottom: 14px; }
  .thumb.emoji { width: 38px; height: 38px; font-size: 1.15rem; }

  .clients li {
    position: relative;
    grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr);
    justify-items: stretch; align-items: baseline;
    gap: 14px;
    padding: 11px 0 11px 14px;
  }
  .clients li::before {
    content: "";
    position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 3px; border-radius: 2px;
    background: var(--brand);
  }
  .clients span { text-wrap: auto; }

  .clients li.has-link { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1px 14px; }
  .clients li.has-link strong { grid-column: 1; grid-row: 1; }
  .clients li.has-link span { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
  .site-btn { grid-column: 2; grid-row: 1 / 3; margin-top: 0; padding: 7px 12px; }

  .chips { padding: 14px 0 18px; }
}

/* ---------- Liens ---------- */
.links { display: grid; gap: 12px; }
.links .heading {
  margin-top: 16px;
  padding: 0 4px;
  font: 500 .82rem/1.45 var(--font-mono);
  color: var(--muted-foreground);
  text-align: center;
  text-wrap: balance;
}
.links > li:not(.heading) > a {
  position: relative;
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 12px;
  min-height: 66px;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .15s, background .15s;
}
.links > li:not(.heading) > a:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--brand) 70%, transparent); background: var(--surface-elevated); }
.links > li:not(.heading) > a:active { transform: scale(.985); }

.thumb {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--brand-bright);
  flex: none;
  transition: background .15s, color .15s, border-color .15s;
}
.links a:hover .thumb { background: var(--brand); border-color: var(--brand-bright); color: var(--on-brand); }
.txt { display: grid; min-width: 0; text-align: center; text-wrap: balance; }
.txt strong { font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.txt small { color: var(--muted-foreground); font-size: .84rem; line-height: 1.4; margin-top: 1px; text-wrap: pretty; }
.tag {
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  color: var(--muted-foreground);
  font: 500 .62rem/1.5 var(--font-mono);
  letter-spacing: .04em; text-transform: uppercase;
  vertical-align: middle;
}
.go { justify-self: end; margin-right: 4px; color: var(--muted-foreground); transition: transform .2s, color .15s; }
a:hover .go { transform: translate(2px, -2px); color: var(--brand-bright); }

/* Titre de section avec séparateur */
.links .heading.divider {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--border-strong);
  color: var(--foreground);
  font-size: .9rem;
}

/* Embeds (YouTube, Spotify) */
.embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); line-height: 0; }
.embed iframe { width: 100%; border: 0; display: block; }
.embed.video iframe { aspect-ratio: 16 / 9; height: auto; }

/* Friends' Instagram accounts */
.friends { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.friends a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font: 500 .78rem var(--font-mono);
  transition: transform .2s, border-color .15s, background .15s, color .15s;
}
.friends .ico { width: 18px; height: 18px; color: var(--brand-bright); }
.friends span { white-space: nowrap; }
.friends a:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--brand) 70%, transparent); background: var(--surface-elevated); }

/* Lien mis en avant */
.links li.featured a {
  min-height: 80px;
  background: var(--brand);
  border-color: var(--brand-bright);
  color: var(--on-brand);
  box-shadow: 0 12px 32px -14px color-mix(in oklch, var(--brand) 80%, transparent);
}
.links li.featured a:hover { background: var(--brand-bright); border-color: var(--brand-bright); }
.featured .thumb { background: oklch(100% 0 0 / .16); border-color: oklch(100% 0 0 / .22); color: var(--on-brand); }
.links li.featured a:hover .thumb { background: oklch(100% 0 0 / .24); border-color: oklch(100% 0 0 / .3); }
.featured .thumb.logo, .links li.featured a:hover .thumb.logo { background: oklch(97% .004 90); border-color: transparent; padding: 3px; }
.thumb.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.featured small, .featured .go { color: oklch(98% .005 90 / .85); }
.featured a:hover .go { color: var(--on-brand); }
.badge {
  position: absolute; top: -9px; left: 14px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--foreground); color: var(--background);
  font: 600 .66rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- Pied de page & toast ---------- */
.foot { margin-top: 40px; display: grid; gap: 6px; text-align: center; color: var(--muted-foreground); font: 400 .75rem/1.6 var(--font-mono); }
.foot .credits { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; }
.foot a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.foot a:hover { color: var(--foreground); text-decoration-color: var(--brand-bright); }

/* ---------- Page mentions légales ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--muted-foreground); font: 500 .8rem var(--font-mono); }
.back .ico { width: 16px; height: 16px; transform: rotate(-135deg); }
.legal a.back { color: var(--muted-foreground); text-decoration: none; }
.legal a.back:hover { color: var(--foreground); }
.legal h1 { font-size: 1.6rem; margin-bottom: 6px; }
.legal .lead { color: var(--muted-foreground); margin-bottom: 24px; }
.legal section {
  margin-bottom: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.legal h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 650; letter-spacing: -.01em; }
.legal p { margin: 0 0 8px; color: var(--muted-foreground); font-size: .92rem; line-height: 1.6; }
.legal p:last-child { margin-bottom: 0; }
.legal strong { color: var(--foreground); font-weight: 600; }
.legal a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.legal a:hover { color: var(--brand-bright); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  padding: 9px 16px;
  border-radius: var(--radius);
  background: var(--foreground); color: var(--background);
  font: 500 .8rem var(--font-mono);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animation d’entrée ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.profile > *, .links > li { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.profile > :nth-child(2) { animation-delay: .05s; }
.profile > :nth-child(3) { animation-delay: .08s; }
.profile > :nth-child(4) { animation-delay: .11s; }
.profile > :nth-child(5) { animation-delay: .14s; }
.links > li:nth-child(1) { animation-delay: .20s; }
.links > li:nth-child(2) { animation-delay: .25s; }
.links > li:nth-child(3) { animation-delay: .30s; }
.links > li:nth-child(4) { animation-delay: .35s; }
.links > li:nth-child(5) { animation-delay: .40s; }
.links > li:nth-child(6) { animation-delay: .45s; }
.links > li:nth-child(7) { animation-delay: .50s; }
.links > li:nth-child(n+8) { animation-delay: .55s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 380px) {
  .txt small { display: none; }
  .links > li:not(.heading) > a { min-height: 58px; }
}
