:root{
  --bg-dark: #0d0f14;
  --bg-darker: #0a0c10;
  --glass: rgba(13, 15, 20, .6);
  --glass-strong: rgba(13, 15, 20, .8);
  --text: #e9eef6;
  --muted: #a8b3c7;
  --accent: #4cc9f0;
  --cta: #3dd68c;
  --warning: #ffd166;
  --danger: #ef476f;
  --maxw: 1200px;
  --radius: 18px;
  --gap: 24px;
}

*{box-sizing:border-box}
html,body{height:100%;scroll-behavior:smooth}
body{
  margin:0;
  font-family: Rubik, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg-dark);
}

/* ---------- NAV ---------- */
.nav{
  position:fixed; 
  inset:0 0 auto 0; 
  height:96px;
  display:flex; 
  align-items:center; 
  justify-content:center;
  backdrop-filter:saturate(140%) blur(8px);
  background: linear-gradient(to bottom, rgba(10,12,16,.9), rgba(10,12,16,.5));
  border-bottom:1px solid rgba(255,255,255,.06);
  z-index:50;
}

.nav-inner{
  width:100%; 
  max-width:var(--maxw); 
  display:flex; 
  align-items:center; 
  gap:12px; 
  padding:0 16px;
}

.logo{
  display:flex; 
  align-items:center; 
  gap:10px; 
  font-family:"Chakra Petch", ui-monospace, monospace; 
  font-weight:700; 
  letter-spacing:.5px;
}

.logo img{
  width:64px; 
  height:64px;
}

.spacer{flex:1}

.links{
  display:flex; 
  align-items:center; 
  gap:12px;
}

.nav a{
  color:var(--muted); 
  text-decoration:none; 
  padding:10px 12px; 
  border-radius:12px; 
  font-weight:500; 
  transition:.2s ease;
}

.nav a:hover, .nav a.active{
  color:var(--text); 
  background:rgba(255,255,255,.06);
}

.btn-contact{
  background:var(--accent) !important; 
  color:#001219 !important; 
  font-weight:700;
}

.btn-contact:hover{
  filter:brightness(1.1);
  background:var(--accent) !important;
}

.btn-contact.active {
  background:var(--accent) !important;
  color:#001219 !important;
}

/* ---------- LANGUAGE SWITCHER ---------- */
.lang-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-left: 8px;
}

.lang-switcher button {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.lang-switcher button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), #3a9fc7);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
}

.lang-switcher button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.lang-switcher button.active {
  color: #001219;
  font-weight: 700;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(76, 201, 240, 0.3);
}

.lang-switcher button.active::before {
  opacity: 1;
}

/* Animation au clic */
.lang-switcher button:active {
  transform: scale(0.95);
}

/* ---------- HAMBURGER MENU ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ---------- MOBILE NAV ---------- */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }
  
  .nav .links {
    position: fixed;
    top: 96px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 96px);
    background: rgba(10, 12, 16, 0.98);
    backdrop-filter: saturate(140%) blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px 16px;
    border-left: 1px solid rgba(255,255,255,.08);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    display: flex !important;
  }
  
  .nav .links.active {
    right: 0;
  }
  
  .nav .links a {
    width: 100%;
    text-align: left;
  }
  
  /* Lang switcher in mobile menu */
  .lang-switcher {
    margin: 16px 0 8px 0;
    justify-content: center;
  }
  
  .lang-switcher button {
    flex: 1;
    padding: 10px 16px;
  }
}

/* ---------- HERO LOGO ---------- */
.hero img {
  width: min(100%, 960px);
  height: auto;
  max-width: 100%;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}

/* ---------- PARALLAX SECTIONS ---------- */
.section{
  position:relative; 
  min-height:90vh; 
  display:grid; 
  place-items:center; 
  text-align:center;
}

.parallax{
  background-position:center; 
  background-size:cover; 
  background-repeat:no-repeat;
}

@media (hover:hover){ 
  .parallax{
    background-attachment:fixed;
  } 
}

.overlay{
  position:absolute; 
  inset:0; 
  background:radial-gradient(70% 60% at 50% 30%, rgba(0,0,0,.2), rgba(0,0,0,.65)), 
             linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.5) 95%);
}

.hero{background-image:url('../assets/bg_castle.png');}
.city{background-image:url('../assets/bg_moon.png');}
.lava{background-image:url('../assets/bg_volcano.png');}
.factory{background-image:url('../assets/bg_factory.png');}

.content{
  position:relative; 
  z-index:2; 
  width:min(100%, var(--maxw)); 
  padding:100px 20px 60px;
}

h1{
  font-family:"Chakra Petch"; 
  font-size:clamp(36px, 6vw, 70px); 
  margin:0 0 16px; 
  text-shadow:0 6px 30px rgba(0,0,0,.5);
}

.tagline{
  color:var(--muted); 
  font-size:clamp(16px, 2.2vw, 22px); 
  margin-bottom:24px;
}

.cta-row{
  display:flex; 
  gap:14px; 
  justify-content:center; 
  flex-wrap:wrap;
}

.btn{
  appearance:none; 
  border:0; 
  padding:14px 18px; 
  border-radius:14px; 
  font-weight:700; 
  cursor:pointer; 
  text-decoration:none; 
  display:inline-flex; 
  align-items:center; 
  gap:10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary{
  background:var(--cta); 
  color:#052e2b;
}

.btn-secondary{
  background:rgba(255,255,255,.1); 
  color:var(--text); 
  border:1px solid rgba(255,255,255,.1);
}

.btn:hover{
  transform:translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn:active{
  transform:translateY(0);
}

/* ---------- TRAILER ---------- */
.panel{
  background:var(--glass-strong); 
  border:1px solid rgba(255,255,255,.08); 
  border-radius:var(--radius);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.panel.pad{padding:20px}

.trailer{
  width:min(100%, 900px); 
  aspect-ratio:16/9; 
  overflow:hidden;
}

.trailer iframe{
  width:100%; 
  height:100%; 
  border:0;
}

/* ---------- FEATURES ---------- */
.features{
  display:grid; 
  grid-template-columns:repeat(3, 1fr); 
  gap:var(--gap); 
  margin-top:40px;
}

.feature{
  padding:24px; 
  background:var(--glass); 
  border:1px solid rgba(255,255,255,.08); 
  border-radius:var(--radius);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature:hover{
  transform: translateY(-4px);
  border-color: rgba(76, 201, 240, 0.3);
}

.feature h3{margin:10px 0 6px}
.feature p{margin:0; color:var(--muted)}
.icon{font-size:34px}

/* ---------- REQUIREMENTS ---------- */
.reqs{
  display:grid; 
  grid-template-columns:1fr 1fr; 
  gap:var(--gap); 
  margin-top:30px;
}

.reqs h4{margin:0 0 10px}

.req-card{
  padding:18px; 
  background:var(--glass); 
  border:1px solid rgba(255,255,255,.08); 
  border-radius:var(--radius); 
  text-align:left;
}

.req-card ul{
  margin:0; 
  padding-left:18px; 
  line-height:1.7; 
  color:var(--muted);
}

/* ---------- SCREENSHOTS ---------- */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.screenshot {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(76, 201, 240, 0.4);
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10000;
}

.lightbox .close:hover {
  color: var(--danger);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- BUILD STATUS ---------- */
.build-wrap {
  width: 100%;
  margin-bottom: 10px;
}

.build-status {
  margin-bottom: 12px;
  text-align: left;
  opacity: 0.85;
  font-size: 0.9rem;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.3s ease;
}

.build-status.loaded {
  opacity: 1;
}

.build-status.error {
  opacity: 0.6;
  color: var(--warning);
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--bg-darker);
  padding: 40px 20px;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
}

/* Structure générale */
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;                /* <== centre le footer entier */
}

/* Ligne 1 */
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Bloc gauche */
.footer-left p {
  margin: 0;
  color: var(--muted);
}

/* Réseaux sociaux */
.footer-right {
  display: flex;
  gap: 22px;
}

.footer-right a {
  display: flex;
  align-items: center;
}

.icon {
  width: 22px;
  height: 22px;
  fill: var(--text);
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-right a:hover .icon {
  opacity: 1;
  transform: scale(1.15);
}

.footer-right a:hover {
  opacity: 1;
}


.legal-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  opacity: 0.75;
}

.legal-links a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.legal-links a:hover {
  opacity: 1;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px){
  .features{grid-template-columns:1fr}
  .reqs{grid-template-columns:1fr}
}

/* Responsive: 1 column on mobile */
@media (max-width: 768px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .lightbox .close {
    top: 20px;
    right: 20px;
    font-size: 40px;
  }
}

/* Tablet: 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* MD Align */
.md-content {
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}

.md-content * {
  text-align: left !important;
}
