:root {
  --bg: #0b0d10;
  --bg-elev: #12151b;
  --text: #e8ecf1;
  --muted: #9aa5b1;
  --primary: #8cccff;        /* Accent principal */
  --primary-2: #b693ff;      /* Accent secondaire pour dégradés */
  --card: #12151b99;
  --glass: 12px;
  --radius: 14px;
  --ring: 0 0 0 1px #000 inset, 0 0 0 1px #ffffff12;
  --shadow-1: 0 10px 30px -10px #000, 0 0 0 1px #000 inset;
  --shadow-2: 0 20px 60px -20px rgba(140,204,255,.25), 0 0 0 1px #ffffff10;
  --bg-image: none;          /* Ex: url('../assets/img/bg.jpg') */
  --header-height: 72px;     /* hauteur du header fixe (ajuste si besoin) */
}

:root.light {
  --bg: #f6f7f9;
  --bg-elev: #ffffff;
  --text: #0e1217;
  --muted: #596273;
  --card: #ffffffcc;
  --shadow-2: 0 20px 60px -20px rgba(16, 86, 214, .15), 0 0 0 1px #00000010;
  --header-height: 72px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;

  /* espace pour le header fixe afin que le contenu ne soit pas masqué */
  padding-top: var(--header-height);
}

/* Si tu préfères ne pas ajouter le padding globalement, on peut appliquer
   margin-top côté #main (ou .section:first-of-type). */

.no-js .reveal { opacity: 1; transform: none; }

a, a:visited { text-decoration: none; color: inherit; }

/* Fond fixe */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.bg-gradient {
  position: absolute; inset: -10% -10%;
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(140,204,255,.10), transparent 60%),
    radial-gradient(1000px 700px at 90% 20%, rgba(182,147,255,.12), transparent 60%),
    radial-gradient(900px 700px at 50% 90%, rgba(255,150,180,.10), transparent 60%),
    linear-gradient(180deg, #0b0d10, #0b0d10);
  background-attachment: fixed;
  filter: saturate(110%);
}
.bg-noise {
  position: absolute; inset: -20%;
  background-image: var(--bg-image), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='0 0 0 .06 0'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: cover, 120px 120px;
  opacity: .35;
  mix-blend-mode: overlay;
  background-attachment: fixed;
}
.bg-blobs .blob {
  position: absolute;
  width: 40vmax; height: 40vmax;
  filter: blur(60px);
  background: radial-gradient(closest-side, rgba(140,204,255,.20), transparent 70%);
  animation: blob 24s ease-in-out infinite;
  transform: translate3d(0,0,0);
}
.bg-blobs .blob:nth-child(1){ top: -10%; left: -10%; }
.bg-blobs .blob:nth-child(2){ top: 20%; right: -15%; animation-duration: 30s; }
.bg-blobs .blob:nth-child(3){ bottom: -20%; left: 30%; animation-duration: 28s; }
@keyframes blob {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50%     { transform: translate3d(5%, -3%, 0) scale(1.05); }
}

/* Layout */
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: clamp(48px, 6vw, 96px) 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px){ .grid-2 { grid-template-columns: 1.1fr .9fr; gap: 32px; } }

/* Header
   -> rendu fixe pour rester toujours visible */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 9999;
  display: block;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg-elev) 85%, transparent);
  box-shadow: var(--ring);
}

/* .header-inner contient la grille interne; on force sa hauteur pour correspondre
   à la variable --header-height et on centre verticalement le contenu. */
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto; /* on ne réserve plus une colonne fixe pour le marqueur */
  align-items: center;
  gap: 12px; /* réduit un peu l'espace horizontal */
  padding: 12px 0;
  height: 100%;
  align-content: center;
}

/* Si tu as un header plus grand sur mobile, on peut ajuster --header-height via media queries */
@media (max-width: 480px) {
  :root { --header-height: 78px; }
}

/* Branding */
.brand { display: grid; grid-template-columns: auto; gap: 8px; align-items: center; text-decoration: none; color: var(--text); }
/* Masque le carré décoratif sans toucher au HTML */
.brand-mark { display: none !important; }

.brand-text span { color: var(--muted); font-size: 12px; display: block; margin-top: -2px; }

.nav { list-style: none; display: none; margin: 0; padding: 0; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: #ffffff07; }
@media (min-width: 840px){ .nav { display: flex; } }

.btn {
  border: none; border-radius: 999px; padding: 10px 16px; cursor: pointer;
  color: var(--text); background: #ffffff0f; box-shadow: var(--ring);
}
.btn.ghost { background: #ffffff0a; }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.btn.glow { box-shadow: 0 0 0 0 rgba(140,204,255,.6); transition: box-shadow .25s ease, transform .25s ease; }
.btn.glow:hover { box-shadow: 0 12px 50px -12px rgba(140,204,255,.55); transform: translateY(-2px); }

/* Texte noir spécifiquement pour le bouton "Voir le showreel" */
a.btn.primary.glow[href="#showreel"] {
  color: #000;
}
a.btn.primary.glow[href="#showreel"]:hover,
a.btn.primary.glow[href="#showreel"]:focus,
a.btn.primary.glow[href="#showreel"]:active {
  color: #000;
};/* Hero */
.hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
}
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.2fr .8fr; gap: 40px; }
}
.hero-copy h1 { margin: 0 0 10px 0; }
.gradient-text {
  background: linear-gradient(90deg, var(--text), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hue 10s linear infinite;
}
@keyframes hue {
  0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(20deg); }
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.card {
  background: color-mix(in oklab, var(--card) 100%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  border: 1px solid #ffffff12;
}
.card.glass { backdrop-filter: blur(var(--glass)); background: #0c0f1499; }
.card img { display: block; width: 100%; height: auto; }
.card-body { padding: 16px; }
.hover-glow { transition: transform .25s ease, box-shadow .3s ease; }
.hover-glow:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

/* Embeds */
.embed { position: relative; width: 100%; }
.embed-16by9 { padding-top: 56.25%; }
.embed-spotify { height: 352px; }
.embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px;
}

/* Contraintes pour le showreel */
#showreel {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px;
}
#showreel .embed { width: 100%; max-width: 100%; }
#showreel iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 65vh; /* limite la hauteur à 65% de la fenêtre */
  border-radius: 12px;
}
/* alternative si l'embed utilise une technique padding-top (16:9) */
#showreel .embed-16by9 { padding-top: 56.25%; max-height: 65vh; overflow: hidden; }
#showreel .embed-16by9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Tabs */
.tabs { margin-top: 16px; }
.tab-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  background: #ffffff08; color: var(--text); border: 1px solid #ffffff12;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.tab.active, .tab:focus-visible { outline: none; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.tab-panels { margin-top: 12px; }
.tab-panel[hidden] { display: none; }

/* Projects */
.projects {
  display: grid; gap: 20px; grid-template-columns: 1fr;
}
@media (min-width: 800px) { .projects { grid-template-columns: repeat(3, 1fr); } }

/* Form */
.form { padding: 16px; }
label { display: grid; gap: 6px; color: var(--muted); }
input, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #ffffff1a;
  background: #0e1217cc; color: var(--text); outline: none; box-shadow: var(--ring);
}
input:focus, textarea:focus { border-color: color-mix(in oklab, var(--primary) 70%, #fff0); }

/* Footer */
footer { padding: 32px 0; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Typo/utilitaires */
h1, h2, h3 { line-height: 1.2; }
h2 { margin: 0 0 6px 0; }
p { margin: 0 0 12px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.bullets { padding-left: 18px; }
.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 8px; top: 8px; width: auto; height: auto; padding: 8px 10px; background: #000; color: #fff; border-radius: 6px; }

/* Reveal au scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Accessibilité: réduit les animations si préféré */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Centrer la nav dans l'en-tête */
.header-inner { align-items: center; }

/* Place la <ul.nav> au centre de la grille header-inner */
.nav { justify-self: center; }

/* S'assurer que les items sont bien alignés au centre de la nav */
.nav { display: flex; justify-content: center; gap: 18px; }

/* Pour mobile : garder le même comportement si la nav devient visible */
@media (max-width: 839px) {
  .nav { justify-self: center; }
}

/* animation de scroll */
html {
  scroll-behavior: smooth;
}

/* compense l'en-tête fixe (utilise la variable --header-height si définie) */
section {
  scroll-margin-top: var(--header-height, 72px); /* fallback 72px */
}
