:root {
  --bg-void: #030a1c;
  --card-bg: rgba(8, 20, 52, 0.78);
  --cyan-neon: #00f2fe;
  --silver-pro: #a9b8d4;
  --blue-deep: #2563eb;
  --border-hud: rgba(140, 170, 230, 0.22);
  --text-white: #f8fafc;
  --text-muted: #9fb0cf;
  --font-ui: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-void);
  background-image:
    radial-gradient(circle at 50% -10%, #123a8f 0%, rgba(18, 58, 143, 0) 60%),
    linear-gradient(180deg, #071a45 0%, var(--bg-void) 100%);
  background-attachment: fixed;
  color: var(--text-white);
  font-family: var(--font-ui);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

img { max-width: 100%; }
h2, h3 { line-height: 1.2; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: #fff; color: #000; padding: 8px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

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

#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; z-index: 3; }

/* ---------- Navigation ---------- */
.glass-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  background: rgba(5, 14, 38, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-hud);
  border-radius: 40px;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.brand-id { font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -0.5px; }
.brand-id span { color: var(--silver-pro); font-weight: 400; }
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-white); }
.nav-links a.active:not(.btn-recruit) { text-shadow: 0 0 12px rgba(0, 242, 254, 0.6); }
.btn-recruit {
  background: #fff;
  color: #000 !important;
  font-weight: 700 !important;
  padding: 8px 22px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-recruit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3); }
/* Case à cocher cachée mais accessible au clavier (menu mobile sans JS) */
.nav-check {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-hud); color: #fff;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-check:focus-visible ~ .nav-toggle { outline: 2px solid var(--cyan-neon); outline-offset: 2px; }

/* ---------- Cartes ---------- */
.hud-card {
  background: var(--card-bg);
  border: 1px solid var(--border-hud);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.hud-card:hover { border-color: rgba(0, 242, 254, 0.45); transform: translateY(-4px); }

section { padding: 80px 0; scroll-margin-top: 20px; }
.kicker { color: var(--cyan-neon); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 8px; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 18px; }
.section-intro { color: var(--text-muted); max-width: 640px; margin-bottom: 32px; }
.sub-title { font-size: 1.1rem; color: var(--silver-pro); margin: 8px 0 18px; font-family: var(--font-mono); font-weight: 600; }
.timeline-list + .sub-title { margin-top: 44px; }
.card-text { color: var(--text-muted); font-size: 0.92rem; margin-top: 6px; }
.skill-icon { font-size: 1.8rem; margin-bottom: 12px; color: var(--cyan-neon); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.tag {
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border-hud);
  padding: 4px 12px; border-radius: 20px; font-size: 0.76rem; font-weight: 600; color: var(--silver-pro);
}

/* ---------- Hero ---------- */
.hero-section { min-height: 100vh; display: flex; align-items: center; padding-top: 100px; position: relative; z-index: 3; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.avatar {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.badge-status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-hud);
  border-radius: 30px;
  font-size: 0.8rem; font-weight: 600;
}
.status-dot { width: 8px; height: 8px; flex: none; background: #10b981; border-radius: 50%; box-shadow: 0 0 10px #10b981; animation: pulse 2s infinite; }
h1.hero-title { font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1.05; font-weight: 800; letter-spacing: -2px; margin-bottom: 15px; }
.pro-text {
  background: linear-gradient(135deg, #fff 30%, #7fb0ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.3rem; color: var(--cyan-neon); font-weight: 600; margin-bottom: 20px; }
.hero-p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 30px; max-width: 560px; }
.hero-p strong { color: #fff; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  padding: 12px 24px; border-radius: 12px; font-weight: 600; font-size: 0.92rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: all 0.25s ease;
}
.btn-main { background: #fff; color: #000; box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15); }
.btn-main:hover { transform: translateY(-2px); }
.btn-hollow { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-hud); color: #fff; }
.btn-hollow:hover { background: rgba(255, 255, 255, 0.14); }

.stat-row { display: flex; gap: 32px; margin-top: 34px; flex-wrap: wrap; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 800; color: #fff; line-height: 1.1; }
.stat span { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ---------- Profils visés ---------- */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.profile-card { display: flex; flex-direction: column; }
.profile-card .tag-cloud { margin-bottom: 18px; }
.card-link {
  margin-top: auto; color: var(--cyan-neon); font-weight: 700; font-size: 0.88rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.card-link:hover i { transform: translateX(4px); }
.card-link i { transition: transform 0.2s; }

/* ---------- Vision ---------- */
.vision-title { font-size: 1.9rem; margin: 6px 0 12px; }
.pillar-list { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.pillar-item { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
.pillar-item i { color: var(--cyan-neon); margin-top: 4px; }
.pillar-item strong { color: #fff; }

/* ---------- Compétences ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }

/* ---------- Parcours ---------- */
.timeline-list { display: flex; flex-direction: column; gap: 22px; }
.hardware-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.logo-container {
  width: 80px; height: 80px; border-radius: 18px; background: #fff; padding: 10px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); overflow: hidden;
}
.logo-container.wide { width: 130px; }
.logo-container img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-container.icon-only { background: rgba(255, 255, 255, 0.08); color: var(--cyan-neon); font-size: 1.9rem; }
.tl-date { font-family: var(--font-mono); color: var(--silver-pro); font-size: 0.82rem; }
.tl-title { font-size: 1.2rem; margin: 4px 0; }
.tl-place { color: var(--cyan-neon); font-size: 0.9rem; margin-bottom: 6px; }
.tl-text { color: var(--text-muted); font-size: 0.9rem; }
.slot-badge {
  font-family: var(--font-mono); font-size: 0.74rem; padding: 4px 12px; border-radius: 14px;
  border: 1px solid var(--silver-pro); color: var(--silver-pro); background: rgba(255, 255, 255, 0.05); white-space: nowrap;
}

/* ---------- Langues / Leadership ---------- */
.extras-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.plain-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; color: var(--text-muted); font-size: 0.92rem; }
.plain-list strong { color: #fff; }

/* ---------- Projet ---------- */
.project-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.project-brand img { height: 56px; width: 56px; border-radius: 14px; object-fit: cover; background: #000; }
.project-brand .kicker { margin-bottom: 0; }
.project-title { font-size: 1.7rem; margin: 8px 0 14px; }
.card-text strong { color: #fff; }
.fact-list { margin-bottom: 4px; }
.code-console {
  background: #020814; border: 1px solid #1c2c52; border-radius: 16px; padding: 20px;
  font-family: var(--font-mono); font-size: 0.8rem; color: #cbd5e1; overflow-x: auto; margin-top: 22px; line-height: 1.7;
}
.code-console .c { color: #64748b; }
.code-console .k { color: #c678dd; }
.code-console .s { color: #98c379; }
.code-console .f { color: #56b6c2; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 26px; }
.gallery figure { border-radius: 18px; overflow: hidden; border: 1px solid var(--border-hud); background: rgba(0, 0, 0, 0.35); }
.gallery img { width: 100%; height: 260px; object-fit: cover; display: block; }
.gallery figcaption { padding: 10px 14px; font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border-hud); padding: 70px 0 35px; text-align: center; position: relative; z-index: 3; background: rgba(3, 10, 28, 0.6); }
footer h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
footer .sub { color: var(--text-muted); margin-top: 8px; }
.contact-links { display: flex; justify-content: center; gap: 14px; margin: 25px 0 35px; flex-wrap: wrap; }
.contact-bubble {
  background: var(--card-bg); border: 1px solid var(--border-hud); padding: 12px 24px; border-radius: 30px;
  color: #fff; text-decoration: none; font-size: 0.9rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px; transition: all 0.25s ease;
}
a.contact-bubble:hover { background: #fff; color: #000; transform: translateY(-3px); }
.copyright { color: #6c80a8; font-size: 0.8rem; font-family: var(--font-mono); }

/* ---------- HUD ---------- */
.laptop-hud {
  position: fixed; bottom: 24px; right: 24px;
  background: rgba(5, 14, 38, 0.88); backdrop-filter: blur(10px);
  border: 1px solid var(--border-hud); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 16px; padding: 16px 20px; font-family: var(--font-mono); font-size: 0.75rem;
  z-index: 50; pointer-events: none; display: flex; flex-direction: column; gap: 6px; min-width: 250px;
}
.hud-top { color: var(--silver-pro); font-size: 0.7rem; }
#hud-status { color: #fff; font-weight: 800; }
#hud-state { color: var(--cyan-neon); font-size: 0.72rem; }

@keyframes pulse { 0%, 100% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.3); opacity: 0.4; } }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.faq-item {
  background: var(--card-bg); border: 1px solid var(--border-hud); border-radius: 16px;
  padding: 18px 24px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.faq-item summary {
  cursor: pointer; font-weight: 700; color: #fff; list-style: none; display: flex;
  align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--cyan-neon); font-size: 1.3rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { color: var(--text-muted); margin-top: 12px; font-size: 0.92rem; }

/* ---------- Bandeau de consentement (Google Analytics) ---------- */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  max-width: 620px; margin: 0 auto;
  background: rgba(5, 14, 38, 0.97); border: 1px solid var(--border-hud); border-radius: 20px;
  padding: 18px 22px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between;
}
.consent-banner p { color: var(--text-muted); font-size: 0.86rem; flex: 1 1 320px; }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-actions .btn { padding: 8px 18px; font-size: 0.85rem; }
.consent-banner[hidden] { display: none; }

/* Grand écran : le contenu reste à gauche, le PC 3D occupe la droite */
@media (min-width: 1101px) {
  main .container { width: 56vw; max-width: 780px; margin-left: 5vw; margin-right: auto; }
  .hardware-card { grid-template-columns: auto 1fr; }
  .hardware-card .slot-badge { grid-column: 2; justify-self: start; }
}

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-space { display: none; }
  #webgl-canvas { opacity: 0.45; }
  .laptop-hud { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px;
    background: rgba(5, 14, 38, 0.97); border: 1px solid var(--border-hud); border-radius: 24px;
  }
  .nav-check:checked ~ .nav-links { display: flex; }
  .nav-links a { display: block; padding: 10px 14px; }
  .btn-recruit { text-align: center; }
}

@media (max-width: 700px) {
  section { padding: 56px 0; }
  .hud-card { padding: 22px; }
  .hardware-card { grid-template-columns: 1fr; }
  .gallery img { height: 220px; }
  .hero-section { align-items: flex-start; }
  .avatar { width: 112px; height: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-dot { animation: none; }
  .hud-card, .btn { transition: none; }
}
