:root {
  --gold: #f1c40f;
  --sepia: #e0d2bc;
  --bg-dark: #0f0c0a;
  --panel-bg: rgba(34, 26, 20, 0.95);
  --accent: #8b5e34;
}

* {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--sepia);
  font-family: "Almendra", serif;
  margin: 0;
  overflow-x: hidden;
}

/* ================= SIDEBAR ================= */
.sidebar {
  width: 260px;
  height: 100vh;
  background: #1a150f;
  border-right: 3px solid var(--accent);
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  padding: 20px 0;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.8);
}

.sidebar-logo {
  width: 85%;
  margin: 0 auto 30px auto;
  filter: drop-shadow(0 0 5px rgba(241, 196, 15, 0.5));
}

/* ================= NAV ================= */
.nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  color: var(--sepia);
  text-decoration: none;
  font-family: "MedievalSharp", cursive;
  border-bottom: 1px solid rgba(139, 94, 52, 0.2);
  position: relative;
  overflow: hidden;
  transition:
    background 0.3s,
    padding-left 0.3s,
    text-shadow 0.3s;
}

.nav-links a:hover {
  background: var(--accent);
  color: white;
  padding-left: 35px;
  text-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
}

/* Liseré doré */
.nav-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}
.nav-links a:hover::before {
  transform: scaleY(1);
}

/* Flèche */
.nav-links a::after {
  content: "➤";
  margin-left: auto;
  opacity: 0;
  color: var(--gold);
  transform: translateX(-5px);
  transition: 0.3s ease;
}
.nav-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ================= MAIN CONTENT ================= */
.main-content {
  margin-left: 260px;
  width: calc(100% - 260px);
}

section {
  padding: 100px 10%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ================= HOME ================= */
#home {
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)),
    url("Background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
}

.main-logo {
  max-width: 700px;
  width: 85%;
  animation: floating 4s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.9));
}

.anniversary-badge {
  background: var(--gold);
  color: #000;
  font-family: "Cinzel";
  padding: 10px 25px;
  font-weight: 900;
  border-radius: 5px;
  margin-top: 20px;
  box-shadow: 0 0 20px var(--gold);
}

/* ================= CONTENT ================= */
.content-box {
  background: var(--panel-bg);
  border: 2px solid var(--accent);
  padding: 50px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 1);
  width: 100%;
  max-width: 1000px;
  margin-bottom: 30px;
}

h2 {
  font-family: "Cinzel", serif;
  color: var(--gold);
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 40px;
}

/* ================= GRID ================= */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.tech-card {
  border: 1px solid var(--accent);
  background: rgba(0, 0, 0, 0.4);
  padding: 30px;
  text-align: center;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.tech-card h3 {
  color: var(--gold);
  font-family: "MedievalSharp";
  font-size: 1.4rem;
}

/* ================= SCREENSHOTS ================= */
.screenshot-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 6px;
  cursor: zoom-in;
}

.screenshot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.screenshot-card:hover img {
  transform: scale(1.05);
}

/* ================= LIGHTBOX ================= */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 40px #000;
}

/* ================= FORM ================= */
.alpha-form {
  max-width: 450px;
  width: 100%;
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.alpha-input {
  padding: 15px;
  background: #000;
  border: 1px solid var(--accent);
  color: #fff;
  font-family: "Almendra";
}

.alpha-btn {
  padding: 18px;
  background: var(--gold);
  border: none;
  font-family: "Cinzel";
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.alpha-btn:hover {
  background: #b8860b;
  box-shadow: 0 0 15px var(--gold);
}

/* ================= ANIMATIONS ================= */
@keyframes floating {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-25px);
  }
}

@keyframes menuItemIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ================= FOOTER ================= */
footer {
  background: #000;
  text-align: center;
  padding: 40px;
  border-top: 3px solid var(--accent);
}

/* ================= MOBILE / TABLET ================= */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 2000;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 15px;
  font-size: 22px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition:
      transform 0.35s ease,
      box-shadow 0.35s ease;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.9);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  section {
    padding: 100px 6%;
  }

  #home,
  section {
    background-attachment: scroll;
    background-position: center top;
  }

  .nav-links a {
    opacity: 0;
    transform: translateX(-10px);
    animation: menuItemIn 0.4s ease forwards;
  }

  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  section {
    min-height: unset;
    padding: 70px 5%;
  }

  .content-box {
    padding: 25px;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 25px;
  }

  .tech-card h3 {
    font-size: 1.25rem;
  }

  p {
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.2px;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tech-card {
    padding: 20px;
  }

  .anniversary-badge {
    font-size: 0.9rem;
    padding: 8px 16px;
  }

  .main-logo {
    max-width: 85%;
  }

  .sidebar {
    height: auto;
    top: 0;
    bottom: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-toggle {
    top: calc(15px + env(safe-area-inset-top));
  }
}
