/* ═══════════════════════════════════════════════════════════════
   GANDALNEXUS — Site minimaliste
   L'anneau, c'est les projets : un hero-orbite qui s'illumine
   au survol, et une page « Nos projets » en deux gestes.
   Charte : #F7931A · #EB720C · #FFFFFF · #14141F · #0D0D16
   Typo : Orbitron (display) · Exo 2 (corps)
   ═══════════════════════════════════════════════════════════════ */

/* ── Polices (self-hosted, subsets latin) ─────────────────────── */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/orbitron-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/exo2-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/exo2-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Jetons de design ─────────────────────────────────────────── */
:root {
  --orange: #F7931A;        /* signature — rare, elle signe */
  --orange-deep: #EB720C;   /* hover, accents */
  --blanc: #FFFFFF;
  --encre: #14141F;         /* structure sur clair */
  --nuit: #0D0D16;          /* mode web3 */

  --white-soft: rgba(255, 255, 255, .78);
  --white-dim: rgba(255, 255, 255, .58);
  --white-line: rgba(255, 255, 255, .12);

  --font-display: 'Orbitron', 'Exo 2', sans-serif;
  --font-body: 'Exo 2', sans-serif;

  --container: 1160px;
  --pad: clamp(20px, 5vw, 44px);
  --nav-h: 72px;

  --ease: cubic-bezier(.22, .74, .24, 1);
}

/* ── Socle ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--blanc);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

::selection { background: var(--orange); color: var(--encre); }

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

.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--orange);
  color: var(--encre);
  font-family: var(--font-display);
  font-size: .8rem;
  border-radius: 0 0 10px 10px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Navbar ───────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
}
.nav--scrolled {
  background: rgba(13, 13, 22, .74);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--white-line);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand { flex: none; }
.nav__logo { width: clamp(148px, 16vw, 186px); height: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 26px);
}
.nav__item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white-soft);
  transition: color .2s;
  white-space: nowrap;
}
.nav__item:hover { color: var(--orange); }
.nav__item[aria-current="page"] { color: var(--orange); }
.nav__sep { width: 1px; height: 16px; background: var(--white-line); flex: none; }
.nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--white-dim);
  transition: color .2s, background .2s;
}
.nav__icon:hover { color: var(--orange); background: rgba(255, 255, 255, .06); }
.lang {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .14em;
  color: var(--encre);
  background: var(--orange);
  border: 0;
  border-radius: 8px;
  padding: 8px 13px;
  cursor: pointer;
  transition: background .2s;
}
.lang:hover { background: var(--orange-deep); }

/* ── Décors partagés (hero & projets) ─────────────────────────── */
/* motif_02_constellation : variante nuit de la charte — nœuds reliés, sans répétition d'orbites. */
.fx-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/patterns/motif_02_constellation.svg') center / cover no-repeat;
  opacity: .38;
  -webkit-mask-image: radial-gradient(ellipse 82% 72% at 50% 40%, black 18%, transparent 96%);
  mask-image: radial-gradient(ellipse 82% 72% at 50% 40%, black 18%, transparent 96%);
}
.fx-glow {
  position: absolute;
  top: 46%;
  left: 50%;
  width: min(72vw, 720px);
  aspect-ratio: 1;
  transform: translate(-50%, -56%);
  background: radial-gradient(circle, rgba(247, 147, 26, .14) 0%, rgba(247, 147, 26, .045) 44%, transparent 68%);
  pointer-events: none;
}

/* ── Hero : l'orbite interactive ──────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--nav-h) + 24px) 48px;
  overflow: clip;
  text-align: center;
}
.hero__orbit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 4vh, 40px);
  border-radius: 24px;
}
.hero__orbit::before {
  content: '';
  position: absolute;
  top: 42%;
  left: 50%;
  width: 130%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 147, 26, .16) 0%, rgba(247, 147, 26, .05) 40%, transparent 66%);
  opacity: .55;
  transition: opacity .4s, transform .6s var(--ease);
  pointer-events: none;
}
.hero__orbit:hover::before,
.hero__orbit:focus-visible::before,
.hero__orbit.is-hl::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}
.hero__hint {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color .3s;
  white-space: nowrap;
}
.hero__hint-arrow {
  display: inline-block;
  transition: transform .3s var(--ease);
}
.hero__orbit:hover .hero__hint,
.hero__orbit:focus-visible .hero__hint,
.hero__orbit.is-hl .hero__hint { color: var(--orange); }
.hero__orbit:hover .hero__hint-arrow,
.hero__orbit:focus-visible .hero__hint-arrow,
.hero__orbit.is-hl .hero__hint-arrow { transform: translate(3px, -3px); }

/* ── Page « Nos projets » ─────────────────────────────────────── */
.proj {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--nav-h) + 40px) 64px;
  overflow: clip;
  text-align: center;
}
.proj__stack {
  position: relative;
  width: 100%;
  max-width: 960px;
  padding-inline: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.proj__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  text-align: left;
}
.proj-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.proj-card:first-child { padding-right: clamp(28px, 5vw, 56px); }
.proj-card + .proj-card {
  border-left: 1px solid var(--white-line);
  padding-left: clamp(28px, 5vw, 56px);
}
.proj-card__name {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
/* Le nœud orange : les deux points de l'anneau, materialisés. */
.proj-card__name::before {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--orange);
}
.proj-card__body {
  color: var(--white-soft);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  margin-bottom: 26px;
}
.proj-card__body + .proj-link { margin-top: auto; } /* les deux liens alignés sur la même ligne */
.proj-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .84rem;
  letter-spacing: .06em;
  color: var(--orange);
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.proj-link:hover { color: var(--orange-deep); border-bottom-color: var(--orange-deep); }

/* ── Révélation d'entrée ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav__item { display: none; } /* l'orbite du hero est le chemin vers les projets */
  .nav__sep { display: none; }
  .nav__inner { gap: 12px; }
  .nav__links { gap: 10px; }
  .nav__logo { width: 136px; }
}

@media (max-width: 760px) {
  .proj__grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .proj-card:first-child { padding-right: 0; }
  .proj-card + .proj-card {
    border-left: 0;
    border-top: 1px solid var(--white-line);
    padding-left: 0;
    padding-top: 36px;
  }
  .proj-card__name { justify-content: center; }
  .proj-card__body { margin-inline: auto; max-width: 34ch; }
}

@media (max-width: 420px) {
  .lang { padding: 8px 11px; }
}

/* ── Mouvement réduit ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .nav__icon, .hero__hint, .hero__hint-arrow,
  .hero__orbit::before, .proj-link { transition: none; }
}
