/* Import Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Global variables */
:root {
  --green: #1aa36f;
  --light-green: #e9f7f1;
  --dark: #123024;
  --grey: #f5f5f5;
  --text: #222222;
  --radius: 14px;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.6;
}

/* Header */
header {
  background: #ffffff;
  border-bottom: 1px solid #e5f5e5;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-logo {
  height: 48px;
}

.header-lang {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid #cccccc;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.lang-btn {
  border: none;
  padding: 0.35rem 1rem;
  background: transparent;
  color: #666666;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--green);
  color: #ffffff;
}

/* Banner */
.banner-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 1.7rem auto 3.5rem auto;
  padding: 0 1rem;
}

.banner {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.badge {
  position: absolute;
  top: 15px;
  left: calc(15px + 1rem);
  background: #e53935;
  padding: 0.45rem 0.9rem;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 600;
}

/* Listes */
ul {
  list-style: circle;
  padding: 6px;
  margin: 8px;
}

li {
  padding-left: 2px;
}

.flacon {
  position: absolute;
  bottom: -65px;
  right: calc(25px + 1rem);
  width: 230px;
  max-width: 33%;
  pointer-events: none;
}

/* Main content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

p {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  background: var(--light-green);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 2.2rem;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-list {
  list-style: none;
}

.hero-list li {
  padding-left: 1.4rem;
  margin-bottom: 0.45rem;
  position: relative;
}

.hero-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 600;
}

/* Titles */
h1 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

h2 {
  font-size: 1.45rem;
  margin: 1.7rem 0 0.9rem;
  font-weight: 600;
}

/* Vidéo responsive 16:9 */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 2.4rem auto 2rem auto; /* plus d'espace avant la vidéo */
  padding: 0 1rem;
}

.video-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.video-inner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Grid of arguments */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 2.4rem; /* plus d'espace avant les 3 cases */
}

.card {
  background: var(--grey);
  padding: 1rem;
  border-radius: var(--radius);
}

/* Icônes SVG arguments */
.card-icon {
  margin-bottom: 0.3rem;
}

.card-icon-img {
  display: block;
  width: 40px;
  height: auto;
}

/* FAQ */
.faq-item {
  margin-bottom: 0.9rem;
}

.faq-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

/* CTA vétérinaire */
.cta-box {
  background: #f0faf6;
  padding: 1.3rem;
  border-radius: var(--radius);
  margin-top: 1.7rem;
  text-align: center;
}

/* Mini bannière jeu Localim */
.lower-banner-subtitle {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}

.lower-banner-wrapper {
  max-width: 1000px;
  margin: 1.2rem auto 0 auto;
  padding: 0 1rem;
}

.lower-banner-link {
  display: block;
  position: relative;
}

.lower-banner-img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* Bouton rouge jouer overlay */
.lower-banner-btn {
  display: inline-block;
  background: #e53935;
  color: #ffffff;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
}

.lower-banner-btn-overlay {
  position: absolute;
  right: 15px;
  bottom: 15px;
}

/* Footer avec logo Biokema */
footer {
  margin-top: 2.2rem;
  padding: 1rem;
  border-top: 1px solid #e5f5e5;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #777777;
}

.footer-logo {
  height: 28px;
}

.footer-links a {
  color: #777777;
  text-decoration: none;
  margin-left: 0.8rem;
}

.footer-links a:first-child {
  margin-left: 0;
}

/* Game container */
.game-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.game-area {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.story-text {
  max-width: 600px;
  margin: 1rem auto;
}

/* Game instructions */
.game-instructions {
  background: #e9f7f1;
  border-radius: 12px;
  padding: 1.2rem;
  max-width: 600px;
  margin: 1.5rem auto;
}

.instruction-item {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d7eae0;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.7rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.instruction-icon-img {
  width: 40px;
  height: auto;
  image-rendering: pixelated;
}

/* Game buttons */
.start-btn,
.restart-btn {
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.5rem;
  margin-top: 1rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Game info */
.game-info {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.8rem;
}

.game-info div {
  background: var(--green);
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

/* Game canvas and cells */
.game-canvas {
  position: relative;
  margin: 0 auto;
  background: #f5f5f5;
  border-radius: 8px;
}

.game-cell {
  position: absolute;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* sprites pixel art */
.sprite-img {
  width: 80%;
  height: auto;
  image-rendering: pixelated;
}

.wall {
  background: #d9eee4;
  border-radius: 6px;
}

/* Mobile controls */
.mobile-controls {
  margin-top: 1rem;
  display: none;
}

.controls-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 0.5rem;
}

.control-btn {
  width: 60px;
  height: 60px;
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 26px;
  cursor: pointer;
  touch-action: none;
}

/* Responsive */
@media (max-width: 700px) {
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-center {
    justify-content: flex-start;
  }

  .header-lang {
    position: static;
    transform: none;
  }

  .flacon {
    width: 180px;
    bottom: -40px;
    right: 1rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .mobile-controls {
    display: block;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
