/* ═══════════════════════════════════════════════════════════════════════════
   YemYem.fr, vitrine des projets
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, latin subset) ───────────────────────────────────── */

@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/cinzel.woff2') format('woff2');
  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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-italic.woff2') format('woff2');
  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: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/instrument-sans.woff2') format('woff2');
  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;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */

:root {
  --void:   #020810;
  --star:   #e8f4fd;
  --title:  #ddf0ff;
  --mist:   #a9c3d8;   /* secondary text, 10:1 */
  --dust:   #7f97ab;   /* tertiary text, 6:1 */
  --cyan:   #3fdcff;
  --cyan-soft: #bff3ff;
  --gold:   #d9b46f;
  --green:  #4ade80;
  --amber:  #f5b85a;

  --line:   rgba(150, 200, 255, 0.14);
  --card:   rgba(12, 24, 46, 0.62);

  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-accent:  'Cormorant Garamond', Georgia, serif;
  --font-body:    'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --glow: 0 0 10px rgba(0, 190, 230, 0.55), 0 0 28px rgba(0, 190, 230, 0.30), 0 0 70px rgba(0, 180, 216, 0.14);
  --gutter: clamp(20px, 5.5vw, 80px);
  --max: 1280px;

  color-scheme: dark;
}

/* ── Reset & base ────────────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--star);
  background-color: var(--void);
  /* Deep space fog, fixed under the canvas */
  background-image:
    radial-gradient(ellipse 90% 55% at  8% 85%, rgba(200, 15, 65, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 92% 78%, rgba(170,  8, 45, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 45% 38% at 18% 18%, rgba( 15, 55, 185, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 82% 16%, rgba(  0, 120, 200, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 35% 30% at 50% 48%, rgba( 90, 15, 165, 0.12) 0%, transparent 60%);
  background-attachment: fixed;
}

img { display: block; max-width: 100%; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #9beeff; }

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

h1, h2, h3, p { margin: 0; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--void);
  border: 1px solid var(--cyan);
}
.skip-link:focus { top: 12px; }

/* ── Starfield ───────────────────────────────────────────────────────────── */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--star);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.32em;
}
.brand:hover { color: var(--title); }
.brand svg { flex: none; }

.nav { display: flex; align-items: center; gap: 28px; }

.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mist);
}
.nav-link:hover { color: var(--star); }

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dust);
}
.lang a:hover { color: var(--star); }
.lang a[aria-current="page"] { background: rgba(63, 220, 255, 0.14); color: var(--star); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: min(640px, calc(100svh - 76px));
  padding-top: 48px;
  padding-bottom: 64px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.2em;
  /* Letter-spacing adds trailing space after the last letter: re-center */
  margin-right: -0.2em;
  color: var(--title);
  text-shadow: var(--glow);
  animation: glowPulse 4.2s ease-in-out 1s infinite;
}

.divider {
  width: min(180px, 40vw);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 180, 216, 0.35) 20%, rgba(0, 204, 255, 0.85) 50%, rgba(0, 180, 216, 0.35) 80%, transparent 100%);
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.45);
}

.tagline {
  max-width: 660px;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.55rem, 3.4vw, 2.125rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #c8e4f8;
  text-wrap: balance;
}

.lede {
  max-width: 580px;
  text-wrap: balance;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--mist);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 14px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(63, 220, 255, 0.55);
  background: rgba(63, 220, 255, 0.12);
  box-shadow: 0 0 24px rgba(0, 200, 240, 0.22), inset 0 0 12px rgba(0, 200, 240, 0.10);
  font-size: 15px;
  font-weight: 600;
  color: var(--cyan-soft);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.btn:hover {
  color: #e6fbff;
  background: rgba(63, 220, 255, 0.22);
  border-color: rgba(120, 235, 255, 0.9);
  box-shadow: 0 0 34px rgba(0, 210, 250, 0.45);
}
.btn:focus-visible { border-radius: 999px; }

/* Short entrance: everything readable within half a second */
.hero > * { animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero > :nth-child(2) { animation-delay: 0.06s; }
.hero > :nth-child(3) { animation-delay: 0.10s; }
.hero > :nth-child(4) { animation-delay: 0.14s; }
.hero > :nth-child(5) { animation-delay: 0.18s; }
.hero > .hero-title { animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both, glowPulse 4.2s ease-in-out 1s infinite; }

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding-bottom: clamp(56px, 8vw, 110px); scroll-margin-top: 24px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  margin-bottom: clamp(22px, 3vw, 32px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.625rem, 2.6vw, 2.125rem);
  letter-spacing: 0.12em;
  color: var(--star);
}

.section-meta { font-size: 14px; color: var(--dust); }

/* ── Project cards ───────────────────────────────────────────────────────── */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  --accent: var(--cyan);
  --accent-glow: rgba(63, 220, 255, 0.14);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding: clamp(24px, 2.2vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: radial-gradient(ellipse 90% 60% at 100% 0%, var(--accent-glow) 0%, transparent 60%), var(--card);
  color: var(--star);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
a.card:hover {
  color: var(--star);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), 0 0 30px var(--accent-glow);
}
a.card:focus-visible { border-radius: 20px; outline-color: var(--accent); }

.card--gwynt { --accent: var(--gold);  --accent-glow: rgba(217, 180, 111, 0.16); }
.card--velta { --accent: var(--green); --accent-glow: rgba(74, 222, 128, 0.13); }

.card--soon {
  border-style: dashed;
  border-color: rgba(150, 200, 255, 0.26);
  background: rgba(12, 24, 46, 0.28);
}

.card-top { display: flex; align-items: center; justify-content: space-between; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.card-icon--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(150, 200, 255, 0.30);
  box-shadow: none;
  color: var(--cyan);
}

.card-body { display: flex; flex-direction: column; gap: 10px; }

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.8vw, 1.5rem);
  letter-spacing: 0.06em;
}
.card--soon .card-title { color: var(--mist); }

.card-text { font-size: clamp(0.9375rem, 1.1vw, 1rem); color: var(--mist); text-wrap: pretty; }
.card--soon .card-text { color: var(--dust); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--mist);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.card-host { color: var(--dust); }
.card-open { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }

.pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pill);
  background: color-mix(in srgb, var(--pill) 10%, transparent);
}
.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pill);
  box-shadow: 0 0 8px var(--pill);
}
.pill--live { --pill: var(--green); }
.pill--soon { --pill: var(--amber); }

/* ── Approach ────────────────────────────────────────────────────────────── */

.approach {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 28px 40px;
}

.approach-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.approach-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(63, 220, 255, 0.10);
  border: 1px solid rgba(63, 220, 255, 0.28);
  color: var(--cyan);
}

.approach-title { font-size: 19px; font-weight: 600; line-height: 1.35; }
.approach-text { font-size: 15px; line-height: 1.65; color: var(--mist); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer { margin-top: auto; border-top: 1px solid var(--line); }

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding-top: 28px;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--dust);
}

.footer-links { display: flex; flex-wrap: wrap; column-gap: 28px; }
.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--mist);
}
.footer-links a:hover { color: var(--star); }
.footer-links svg { color: var(--dust); }

/* ── Text pages (legal) ──────────────────────────────────────────────────── */

.page {
  width: 100%;
  max-width: calc(720px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 72px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: var(--dust);
}

.page-title {
  margin: 12px 0 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: 0.12em;
  color: var(--title);
  text-shadow: var(--glow);
}

.prose section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--mist);
  line-height: 1.65;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--star);
}

/* ── 404 ─────────────────────────────────────────────────────────────────── */

.lost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: calc(100svh - 76px - 110px);
  padding: 48px var(--gutter);
  text-align: center;
}

.lost-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5.5rem, 16vw, 9.5rem);
  line-height: 1;
  letter-spacing: 0.12em;
  margin-right: -0.12em;
  color: rgba(221, 240, 255, 0.16);
  text-shadow: 0 0 40px rgba(0, 190, 230, 0.25);
}

.lost-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  letter-spacing: 0.14em;
  color: var(--title);
  text-shadow: var(--glow);
}

.lost-text {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  color: #c8e4f8;
}

.lost-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 24px;
  font-size: 14px;
  color: var(--dust);
}
.lost-links a { display: flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
.lost-links .to-gwynt { color: var(--gold); }
.lost-links .to-velta { color: var(--green); }

/* ── Keyframes ───────────────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: var(--glow); }
  50% {
    text-shadow:
      0 0 12px rgba(0, 200, 240, 0.85),
      0 0 35px rgba(0, 190, 230, 0.50),
      0 0 80px rgba(0, 180, 216, 0.22),
      0 0 120px rgba(80, 140, 255, 0.08);
  }
}

/* ── Small screens ───────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .site-header .wrap { height: 64px; }
  .nav { gap: 18px; }
  .nav-link { display: none; }
  .hero { min-height: min(560px, calc(100svh - 64px)); gap: 20px; }
  .hero-title { letter-spacing: 0.16em; margin-right: -0.16em; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */

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