/* ============================================
   GLOBAL.CSS — shared across all pages
   Portfolio Maxime Meriot
   ============================================ */

/* ── VARIABLES ── */
:root {
  --green:       #00e676;
  --green-dim:   rgba(0, 230, 118, 0.6);
  --green-glow:  rgba(0, 230, 118, 0.08);
  --blue:        #4a9eff;
  --amber:       #fbbf24;
  --violet-color: #c084fc;
  --violet-light: #d8b4fe;
  --violet:      rgba(238,243,239,0.62);
  --violet-dim:  rgba(238,243,239,0.38);
  --violet-glow: rgba(238,243,239,0.04);
  --accent:      var(--violet);
  --bg:          #040904;
  --bg2:         #070d07;
  --text:        #eef3ef;
  --text-muted:  rgba(238, 243, 239, 0.38);
  --text-mid:    rgba(238, 243, 239, 0.65);
  --border:      rgba(0, 230, 118, 0.14);
  --border-soft: rgba(238, 243, 239, 0.07);
  --mono:        'JetBrains Mono', monospace;
  --sans:        'Inter', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── OVERLAY (ambient green glow — particle canvas is injected by main.js) ── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 55% 45% at 75% 28%, rgba(0,230,118,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 60px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(4,9,4,0.55);
  border-bottom: 1px solid var(--border-soft);
}

.nav-logo {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
}
.nav-logo em { color: var(--green); font-style: normal; }

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

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.22s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--green);
  transition: width 0.22s;
}
.nav-links a:hover { color: var(--green); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--green); }
.nav-links a.active::after { width: 100%; }

/* ── LANG SWITCH ── */
.lang-switch {
  display: flex;
  gap: 4px;
  padding-left: 24px;
  border-left: 1px solid var(--border-soft);
}
.lang-btn {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(0,230,118,0.18);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}
.lang-btn.active, .lang-btn:hover {
  border-color: rgba(0,230,118,0.5);
  background: rgba(0,230,118,0.08);
  color: var(--green);
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text-mid);
  transition: background 0.2s;
}
.hamburger:hover span { background: var(--green); }

/* ── BUTTONS ── */
.btn-primary {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--green);
  color: var(--green);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 1px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  z-index: -1;
}
.btn-primary:hover { color: var(--bg); }
.btn-primary:hover::before { transform: scaleX(1); }

.btn-secondary {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 1px;
  transition: all 0.25s;
}
.btn-secondary:hover {
  border-color: var(--border);
  color: var(--text-mid);
}

/* ── Accent button (violet) ── */
.btn-accent {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid rgba(238,243,239,0.3);
  color: var(--violet);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 1px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--violet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  z-index: -1;
}
.btn-accent:hover { color: var(--bg); }
.btn-accent:hover::before { transform: scaleX(1); }

/* ── PAGE WRAPPER (inner pages) ── */
.page-wrapper {
  position: relative;
  z-index: 2;
  padding: 120px 60px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.1s;
}
.page-header .accent-line {
  width: 28px;
  height: 1px;
  background: var(--green);
  margin-bottom: 20px;
}
.page-header .page-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.page-header h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.05;
}
.page-header h1 span {
  font-weight: 300;
  color: rgba(238,243,239,0.35);
}

/* ── SECTION TITLE ── */
.section-title {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(0,230,118,0.6);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 60px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 1.4s;
}
.scroll-hint span {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-bar {
  width: 44px;
  height: 1px;
  background: var(--border-soft);
  position: relative;
  overflow: hidden;
}
.scroll-bar::after {
  content: '';
  position: absolute;
  left: -100%; top: 0;
  width: 100%; height: 100%;
  background: var(--green);
  animation: slide 2.5s ease-in-out infinite;
}
@keyframes slide { 0%{left:-100%} 100%{left:100%} }

/* ── CORNER DECO ── */
.corner-right {
  position: fixed;
  right: 36px;
  bottom: 36px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.corner-right span {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}
.corner-right::after {
  content: '';
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(0,230,118,0.28), transparent);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.25; }
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  nav { padding: 18px 28px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: rgba(4,9,4,0.97);
    padding: 28px;
    gap: 20px;
    border-bottom: 1px solid var(--border-soft);
    z-index: 99;
  }
  .nav-links.open a { font-size: 13px; }
  .hamburger { display: flex; }
  .page-wrapper { padding: 100px 28px 60px; }
  .scroll-hint { left: 28px; }
  .corner-right { display: none; }
}

@media (max-width: 480px) {
  nav { padding: 16px 18px; }
  .nav-right { gap: 16px; }
  .lang-switch { padding-left: 14px; gap: 3px; }
  .lang-btn { padding: 3px 7px; font-size: 9px; letter-spacing: 1.5px; }
  .page-wrapper { padding: 88px 18px 50px; }
  .page-header { margin-bottom: 40px; }
  .page-header h1 { font-size: clamp(28px, 8vw, 42px); }
}

/* ── TOOLTIP ── */
.tooltip-tag { cursor: help; }

#tooltip-box {
  position: fixed;
  background: #0a120b;
  border: 1px solid rgba(0,230,118,0.3);
  color: rgba(238,243,239,0.85);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3px;
  line-height: 1.6;
  padding: 10px 14px;
  width: 280px;
  white-space: normal;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9999;
  display: none;
}
