/* ===================================================================
   Goab Studio — feuille de style
   Thème : pixel-art rétro, clair, accents cyan (yeux du robot) + bois
   =================================================================== */

:root {
  --bg:        #eef0f2;   /* fond clair, proche du logo */
  --bg-panel:  #ffffff;
  --ink:       #1b1f27;   /* gris ardoise (texte) */
  --ink-soft:  #4a515e;
  --metal:     #8a929c;   /* gris métal du robot */
  --metal-dk:  #5b626c;
  --cyan:      #16b6b6;   /* yeux du robot */
  --cyan-dk:   #0e8f8f;
  --wood:      #9c5a3c;   /* bâtons que tient le robot */
  --line:      #1b1f27;
  --dark:      #14181f;   /* sections sombres */
  --dark-2:    #1d232d;

  --shadow:    4px 4px 0 var(--line);
  --shadow-lg: 8px 8px 0 var(--line);

  --font-pix: 'Press Start 2P', monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --maxw: 1100px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; image-rendering: pixelated; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-pix);
  font-size: 11px;
  line-height: 1.4;
  padding: 14px 20px;
  border: 3px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
  text-align: center;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--line); }
.btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--line); }
.btn--primary { background: var(--cyan); color: #04201f; }
.btn--primary:hover { background: var(--cyan-dk); color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { font-size: 9px; padding: 11px 14px; }
.btn--disabled { opacity: .5; pointer-events: none; box-shadow: var(--shadow); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-panel);
  border-bottom: 3px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-mark { font-family: var(--font-pix); font-size: 18px; letter-spacing: 1px; }
.nav__brand-sub { font-family: var(--font-pix); font-size: 8px; color: var(--metal-dk); margin-top: 4px; letter-spacing: 2px; }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-family: var(--font-pix); font-size: 10px; padding: 6px 2px;
  border-bottom: 3px solid transparent; transition: border-color .15s, color .15s;
}
.nav__links a:hover { color: var(--cyan-dk); border-color: var(--cyan); }

.lang-toggle, .theme-toggle {
  font-family: var(--font-pix); font-size: 9px; cursor: pointer;
  background: var(--bg-panel); color: var(--ink);
  border: 3px solid var(--line); box-shadow: 3px 3px 0 var(--line);
  padding: 8px 10px; line-height: 1; transition: transform .08s, box-shadow .08s, background .15s;
}
.theme-toggle { font-size: 13px; padding: 6px 9px; }
.lang-toggle:hover, .theme-toggle:hover { background: var(--cyan); color: #04201f; transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--line); }
.lang-toggle:active, .theme-toggle:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--line); }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 26px; height: 3px; background: var(--ink); display: block; transition: .2s; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 24px 96px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(22,182,182,.12), transparent 60%),
    var(--bg);
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(27,31,39,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,31,39,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}
.hero__inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero__logo-frame {
  display: inline-block;
  background: var(--bg-panel);
  border: 4px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  margin-bottom: 32px;
}
.hero__logo { width: 340px; max-width: 70vw; height: auto; image-rendering: pixelated; }
.hero__logo-fallback { display: none; padding: 28px 40px; }
.hero__logo-fallback-mark { font-family: var(--font-pix); font-size: 46px; display: block; }
.hero__logo-fallback-sub { font-family: var(--font-pix); font-size: 14px; color: var(--metal-dk); letter-spacing: 6px; }

.hero__tagline { font-family: var(--font-pix); font-size: 16px; line-height: 1.7; margin-bottom: 18px; color: var(--ink); }
.hero__lead { font-size: 18px; color: var(--ink-soft); max-width: 560px; margin: 0 auto 32px; }
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 18px; color: var(--metal-dk); animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- SECTIONS ---------- */
.section { padding: 84px 0; }
.section--dark { background: var(--dark); color: #e6e9ee; }
.section__title {
  font-family: var(--font-pix); font-size: 24px; margin-bottom: 40px;
  display: flex; align-items: center; gap: 12px;
}
.section__title--light { color: #fff; }
.section__title-pix { color: var(--cyan); }

/* ---------- À PROPOS ---------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about__text p { margin-bottom: 18px; font-size: 17px; color: var(--ink-soft); }
.about__text strong { color: var(--ink); }
.about__facts {
  list-style: none; background: var(--bg-panel);
  border: 3px solid var(--line); box-shadow: var(--shadow);
}
.about__facts li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 2px solid rgba(27,31,39,.12);
}
.about__facts li:last-child { border-bottom: none; }
.about__facts-k { font-family: var(--font-pix); font-size: 9px; color: var(--metal-dk); }
.about__facts-v { font-weight: 600; text-align: right; }

/* ---------- JEUX ---------- */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.game {
  background: var(--bg-panel); color: var(--ink);
  border: 3px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transition: transform .1s ease, box-shadow .1s ease;
}
.game:hover { transform: translate(-3px,-3px); box-shadow: 11px 11px 0 #000; }
.game__cover {
  display: block; aspect-ratio: 16/9; position: relative;
  border-bottom: 3px solid var(--line); overflow: hidden; background: #c9ced4;
}
.game__cover img { width: 100%; height: 100%; object-fit: cover; }
.game__cover-ph {
  display: none; position: absolute; inset: 0;
  align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-pix); font-size: 10px; line-height: 1.8; color: var(--metal-dk);
  background: repeating-linear-gradient(45deg, #d7dbe0 0 14px, #cdd2d8 14px 28px);
}
.game__cover--empty .game__cover-ph,
.game__cover.game__cover--empty .game__cover-ph { display: flex; }
.game__cover-ph code { font-size: 8px; color: var(--cyan-dk); }
.game__cover-ph small { font-size: 8px; color: var(--metal); }

.game__body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-pix); font-size: 8px; padding: 6px 8px;
  background: #eceef1; border: 2px solid var(--line); color: var(--ink-soft);
}
.tag--live { background: var(--cyan); color: #04201f; }
.tag--soon { background: var(--wood); color: #fff; }
.game__title { font-family: var(--font-pix); font-size: 16px; line-height: 1.5; }
.game__desc { color: var(--ink-soft); font-size: 15px; flex: 1; }
.game__links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- CONTACT ---------- */
.contact__lead { font-size: 18px; color: var(--ink-soft); margin-bottom: 36px; max-width: 600px; }
.contact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact__card {
  background: var(--bg-panel); border: 3px solid var(--line); box-shadow: var(--shadow);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
}
.contact__card:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--line); background: #fbfdff; }
.contact__icon {
  font-size: 22px; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--cyan); border: 3px solid var(--line); color: #04201f; font-weight: 700;
}
.contact__k { font-family: var(--font-pix); font-size: 9px; color: var(--metal-dk); margin-top: 4px; }
.contact__v { font-weight: 600; word-break: break-word; }

/* ---------- FOOTER ---------- */
.footer { background: var(--dark-2); color: #cfd4db; border-top: 3px solid var(--cyan); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; gap: 14px; }
.footer__brand { display: flex; flex-direction: column; line-height: 1; }
.footer__mark { font-family: var(--font-pix); font-size: 16px; color: #fff; }
.footer__sub { font-family: var(--font-pix); font-size: 7px; color: var(--metal); letter-spacing: 2px; margin-top: 4px; }
.footer__copy { font-size: 13px; color: var(--metal); }
.footer__top { font-family: var(--font-pix); font-size: 9px; color: var(--cyan); }
.footer__top:hover { color: #fff; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-panel);
    border-bottom: 3px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav__links a { padding: 16px 24px; border-bottom: 2px solid rgba(27,31,39,.1); border-left: 4px solid transparent; }
  .nav__links a:hover { border-left-color: var(--cyan); border-bottom-color: rgba(27,31,39,.1); }
  .nav.is-open .nav__links { max-height: 280px; }
  .nav__burger { display: flex; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .about { grid-template-columns: 1fr; }
  .games { grid-template-columns: 1fr; }
  .contact { grid-template-columns: repeat(2, 1fr); }
  .hero__tagline { font-size: 13px; }
  .section__title { font-size: 18px; }
}
@media (max-width: 480px) {
  .contact { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .footer__inner { flex-direction: column; text-align: center; justify-content: center; }
}

/* Accessibilité : réduit les animations si demandé */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

/* ===================================================================
   THÈME SOMBRE (optionnel, non-destructif)
   Activation : ajouter  data-theme="dark"  sur la balise <html>.
   Sans cet attribut, le site reste en thème clair.
   =================================================================== */
html[data-theme="dark"] {
  --bg:        #0e1116;
  --bg-panel:  #191f29;
  --ink:       #e8ebef;
  --ink-soft:  #9aa3af;
  --metal:     #8a929c;
  --metal-dk:  #aab2bd;
  --cyan:      #1fc4c4;
  --cyan-dk:   #19a8a8;
  --line:      #000000;
  --dark:      #070a0e;   /* bande "Nos jeux" légèrement plus sombre */
  --dark-2:    #060809;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Grille du hero : lignes claires sur fond sombre */
html[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at 50% 30%, rgba(31,196,196,.16), transparent 60%),
    var(--bg);
}
html[data-theme="dark"] .hero__grid {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
}

/* Cadre du logo : on garde un écran clair pour le logo (fond blanc) */
html[data-theme="dark"] .hero__logo-frame { background: #f4f5f7; border-color: #000; }
html[data-theme="dark"] .hero__logo-fallback-mark { color: #1b1f27; }
html[data-theme="dark"] .hero__logo-fallback-sub { color: #5b626c; }

/* Bordures visibles sur fond sombre (sinon le noir disparaît) */
html[data-theme="dark"] .btn--ghost,
html[data-theme="dark"] .lang-toggle,
html[data-theme="dark"] .theme-toggle { border-color: #3a414d; }
html[data-theme="dark"] .lang-toggle,
html[data-theme="dark"] .theme-toggle { background: var(--bg-panel); color: var(--ink); }
html[data-theme="dark"] .tag { background: #11161d; color: #c4ccd6; border-color: #3a414d; }

/* Étiquettes "pixel" plus lisibles en sombre */
html[data-theme="dark"] .about__facts li { border-bottom-color: rgba(255,255,255,.08); }

/* Zones de capture (placeholder) en sombre */
html[data-theme="dark"] .game__cover { background: #0c0f14; }
html[data-theme="dark"] .game__cover-ph {
  color: var(--metal-dk);
  background: repeating-linear-gradient(45deg, #161c24 0 14px, #11161d 14px 28px);
}
html[data-theme="dark"] .game__cover-ph code { color: var(--cyan); }

/* Survols sur fond sombre */
html[data-theme="dark"] .contact__card:hover { background: #1f2630; }
html[data-theme="dark"] .nav__links a { border-bottom-color: rgba(255,255,255,.08); }
@media (max-width: 860px) {
  html[data-theme="dark"] .nav__links a { border-bottom-color: rgba(255,255,255,.08); }
}
