:root {
  --bg-main: #0a0a0a;
  --bg-panel: rgba(22, 22, 22, 0.85);
  --bg-panel-alt: rgba(46, 46, 46, 0.4);
  --accent: #d8d8d8;
  --text: #d8d8d8;
  --text-muted: #8a8a8a;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
  --gold: #facc15;
  --blue: #60a5fa;
  --green: #22c55e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  background: var(--bg-main);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(216, 216, 216, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; }

/* ===== TOPBAR FULL WIDTH ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link, .dropdown-toggle {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav-link:hover, .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.dropdown-toggle .caret { font-size: 0.65rem; transition: transform 0.2s; }
.has-dropdown.open .dropdown-toggle .caret { transform: rotate(180deg); }

.has-dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  padding: 0.5rem;
  display: none;
}

.has-dropdown.open .dropdown-menu { display: block; }

.dropdown-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem 0.25rem 0.8rem;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: all 0.15s;
}

.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.dropdown-menu a.active { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.dropdown-menu a i.mini-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.dropdown-menu a.disabled {
  opacity: 0.45;
  cursor: default;
}
.dropdown-menu a.disabled:hover { background: transparent; color: var(--text-muted); }

.tag-mini {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tag-staff { color: var(--gold); border-color: rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.08); }
.tag-contrib { color: var(--blue); border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.08); }
.tag-soon { color: var(--gold); border-color: rgba(250, 204, 21, 0.3); background: rgba(250, 204, 21, 0.08); }

/* Lang switcher */
.lang-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.2rem;
  margin-left: 0.5rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--accent); color: #0a0a0a; }
.lang-btn.active:hover { color: #0a0a0a; }

.group-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 2rem 0 0 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.group-title + .cards { margin-top: 1rem; }

.burger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font-size: 1rem;
}

/* ===== LAYOUT ===== */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem 1.5rem;
}

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  text-align: left;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid rgba(216, 216, 216, 0.1);
  padding: 4px;
  background: #0a0a0a;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.1);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero .subtitle {
  color: var(--text-muted);
  margin-top: 0.8rem;
  font-weight: 300;
  max-width: 600px;
}

.badges { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.2rem; }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.role-staff { background: rgba(250, 204, 21, 0.1); border-color: rgba(250, 204, 21, 0.3); color: var(--gold); }
.role-contrib { background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.3); color: var(--blue); }

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: all 0.2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0a0a0a; border-color: transparent; }
.btn-primary:hover { background: #fff; }

.section { padding: 3rem; margin-top: 2rem; }
.section h2 { margin: 0 0 0.4rem 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.section .muted { color: var(--text-muted); font-weight: 300; margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.8rem; }

.card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem;
  text-decoration: none;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card:hover { transform: translateY(-3px); border-color: rgba(216, 216, 216, 0.2); box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 0.6rem; }
.card h3 img { width: 28px; height: 28px; border-radius: 8px; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.88rem; font-weight: 300; flex-grow: 1; }
.card .go { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.card:hover .go { color: var(--text); }

/* Project page */
.project-hero { padding: 0; overflow: hidden; }

.project-content { padding: 2.5rem 3rem 3rem 3rem; }
.project-content h1 { margin: 0 0 0.5rem 0; font-size: 2rem; letter-spacing: -0.02em; }
.project-content .desc { color: var(--text-muted); font-weight: 300; max-width: 700px; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0; }
.tags span {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
}

.feature-list { padding: 0; list-style: none; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.5rem; color: var(--text-muted); font-size: 0.92rem; }
.feature-list li::before { content: '✔ '; color: var(--green); }

.links-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }

.prev-next { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* Map page */
.map-frame {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.map-frame img { width: 100%; display: block; }
.map-missing {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 300;
}
.map-missing code { color: var(--gold); background: rgba(250,204,21,0.08); padding: 0.2rem 0.5rem; border-radius: 6px; }

/* Contact */
.contact-lines { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; font-size: 1.1rem; }
.contact-lines a { text-decoration: none; font-weight: 500; }
.contact-lines a:hover { text-decoration: underline; }

footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #4d4d4d;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  font-weight: 300;
}
footer a { color: #6e6e6e; text-decoration: none; }
footer a:hover { color: var(--text); }

/* Accueil épuré : section "Voir :" */
.hero-clean { align-items: center; }

.see-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.see-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.see-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 216, 216, 0.2);
  background: rgba(46, 46, 46, 0.6);
  box-shadow: var(--shadow);
}

.see-btn i {
  font-size: 1.3rem;
  width: 34px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Contributeurs : PP GitHub en pastilles */
.contributors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0 0.5rem 0;
}

.contributors a {
  display: block;
  line-height: 0;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.contributors a:hover { transform: scale(1.12); }

.contributors img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #111;
  object-fit: cover;
}

/* Drapeaux SVG du switcher de langue */
.flag-icon {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .burger { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #101010;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 1rem 1rem 1rem;
    gap: 0.2rem;
  }
  .main-nav.open { display: flex; }
  .dropdown-menu { position: static; box-shadow: none; margin-top: 0.3rem; }
  .hero { padding: 2.2rem 1.5rem; gap: 1.5rem; text-align: center; justify-content: center; }
  .cta-row, .badges { justify-content: center; }
  .section, .project-content { padding: 2rem 1.4rem; }
  .topbar-inner { gap: 0.8rem; }
  .lang-switcher { margin-left: 0; }
}
