/* =========================================
   POLICE PIRATA ONE
   ========================================= */
@font-face {
  font-family: 'Pirata One';
  src: url('../Pirata_One/PirataOne-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
  --black:   #080808;
  --white:   #f5f5f5;
  --red:     #c83333;
  --grey:    #1a1a1a;
  --grey2:   #111111;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Pirata One', 'Segoe UI', system-ui, sans-serif;
  overflow-x: hidden;
}

/* =========================================
   BOUTON RETOUR — fixe en haut à gauche
   ========================================= */
#back {
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Pirata One', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.25s, color 0.25s;
}
#back:hover            { opacity: 1; color: var(--red); }
#back .arrow           { display: inline-block; transition: transform 0.25s; }
#back:hover .arrow     { transform: translateX(-4px); }

/* =========================================
   BOUTON LANGUE — fixe en haut à droite
   ========================================= */
#lang-toggle {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 100;
  background: transparent;
  border: 1px solid var(--white);
  color: var(--white);
  font-family: 'Pirata One', sans-serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
#lang-toggle:hover { border-color: var(--red); color: var(--red); }

/* =========================================
   SECTION HERO — starfield en fond, titre en bas
   ========================================= */
#hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: transparent;
}

/* Canvas starfield : remplit uniquement le hero */
#starfield-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#hero-text {
  position: relative;
  z-index: 1;
  padding: 0 clamp(32px, 7vw, 110px) clamp(36px, 5vh, 72px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5vh, 16px);
}

#game-title {
  font-size: clamp(2.2rem, min(7vw, 8vh), 5.5rem);
  font-weight: normal;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.1;
}

#game-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--red);
  margin-top: clamp(10px, 1.5vh, 18px);
}

#game-tagline {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.75rem, min(1.3vw, 1.6vh), 1rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* =========================================
   HERO TITLE ROW — icône app + titre + badge store
   ========================================= */
.hero-title-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}

.hero-title-row .app-icon {
  margin-right: clamp(6px, 1vw, 14px);
}

.app-icon {
  width: clamp(64px, 9vw, 96px);
  height: clamp(64px, 9vw, 96px);
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Le titre prend tout l'espace restant */
.hero-title-row #game-title {
  flex: 1;
}

.store-badge {
  position: absolute;
  bottom: clamp(16px, 3vh, 32px);
  right: clamp(24px, 6vw, 100px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(26px, 3.5vw, 36px);
  height: clamp(26px, 3.5vw, 36px);
  border: 1px solid rgba(245, 245, 245, 0.35);
  border-radius: 50%;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s, background 0.25s;
  z-index: 2;
}

.store-badge:hover {
  border-color: rgba(245, 245, 245, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.store-badge svg {
  width: 12px;
  height: 12px;
  fill: var(--white);
}

/* =========================================
   SECTION SCREENSHOTS
   ========================================= */
#screenshots {
  background: var(--black);
  padding: clamp(36px, 6vh, 80px) clamp(24px, 6vw, 100px);
  border-top: 1px solid rgba(245, 245, 245, 0.2);
}

.screenshots-label {
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.3;
  margin-bottom: clamp(16px, 2.5vh, 32px);
}

.screenshot-grid {
  display: grid;
  /* 4 colonnes max, se compresse automatiquement selon la largeur */
  grid-template-columns: repeat(auto-fill, minmax(clamp(100px, 18vw, 190px), 1fr));
  gap: clamp(10px, 1.8vw, 22px);
}

.screenshot-item {
  aspect-ratio: 9 / 16;
  background: var(--black);
  overflow: hidden;
  position: relative;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.screenshot-item:hover {
  transform: scale(1.05);
  z-index: 2;
}

/* L'image est positionnée pour correspondre à l'ouverture de la frame :
   ~5.5% de marge gauche/droite, ~3.5% haut/bas (mesurés sur frame.png) */
.screenshot-item img {
  position: absolute;
  top: 6%;
  left: 8%;
  width: 85%;
  height: 88%;
  object-fit: cover;
  display: block;
}

/* Frame superposée — z-index au-dessus du screenshot, pointer-events none */
.screenshot-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/frame.png') no-repeat center / 100% 100%;
  z-index: 3;
  pointer-events: none;
}

/* Placeholder visuel quand aucune image n'est fournie — via background sur l'élément lui-même */
.screenshot-item:not(:has(img)) {
  background:
    var(--grey)
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.025) 18px,
      rgba(255,255,255,0.025) 19px
    );
}

/* =========================================
   SECTION DESCRIPTION
   ========================================= */
#description {
  background: var(--black);
  padding: clamp(40px, 7vh, 96px) clamp(24px, 6vw, 100px);
}

/* Titre "About the game" — même style que les titres de section de la page d'accueil */
.description-label {
  font-family: 'Pirata One', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: normal;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 1;
  margin-bottom: clamp(24px, 4vh, 48px);
}

.description-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--red);
  margin-top: 14px;
}

.desc-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.9rem, min(1.4vw, 1.8vh), 1.05rem);
  line-height: 2;
  color: var(--white);
  opacity: 0.6;
  max-width: 680px;
  white-space: pre-line;
}

/* =========================================
   SECTION STORE CTA — badge centré
   ========================================= */
#store-cta {
  background: var(--black);
  padding: clamp(32px, 5vh, 64px) clamp(24px, 6vw, 100px) clamp(64px, 10vh, 120px);
  display: flex;
  justify-content: center;
}

.store-badge-full {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 20px 40px;
  border: 1px solid rgba(245, 245, 245, 0.35);
  border-radius: 14px;
  text-decoration: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s, background 0.25s;
}

.store-badge-full:hover {
  border-color: rgba(245, 245, 245, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.store-badge-full-logo {
  width: 36px;
  height: 36px;
  fill: var(--white);
  flex-shrink: 0;
}

.store-badge-full-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-badge-full-sub {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.store-badge-full-name {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* =========================================
   SECTION CONFIDENTIALITY — accordéon discret
   ========================================= */
#privacy {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0 clamp(24px, 6vw, 100px);
}

#privacy details {
  padding: clamp(14px, 2vh, 22px) 0;
}

#privacy summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;         /* retire le triangle natif */
  font-family: 'Pirata One', sans-serif;
  font-size: clamp(0.6rem, 0.9vw, 0.75rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.25;
  transition: opacity 0.25s;
  user-select: none;
}

/* Retire le triangle sur WebKit */
#privacy summary::-webkit-details-marker { display: none; }

#privacy summary:hover { opacity: 0.5; }

/* Chevron SVG inline via background */
#privacy summary::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='%23f5f5f5' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center;
  transition: transform 0.25s;
}

#privacy details[open] summary::after {
  transform: rotate(180deg);
}

#privacy details[open] summary {
  opacity: 0.4;
  margin-bottom: clamp(14px, 2vh, 24px);
}

.privacy-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  line-height: 1.9;
  color: var(--white);
  opacity: 0.3;
  max-width: 680px;
}

/* =========================================
   RESPONSIVE — mobile (≤ 520px)
   ========================================= */
@media (max-width: 520px) {
  #back       { top: 14px; left: 16px; }
  #lang-toggle { top: 14px; right: 16px; }

  #hero { min-height: 42vh; }

  .screenshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
