* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  background: linear-gradient(135deg, #f5e6d3 0%, #e8d4ba 50%, #f0dcc8 100%);
  font-family: Arial, sans-serif;
}

/* ========================================
   CONTENEUR GAMEBOY - MOBILE FIRST
   ======================================== */
.conteneurGameboy {
  width: 100%;
  max-width: 500px;
  background: linear-gradient(180deg, #4ecdc4 0%, #3ab8af 100%);
  border-radius: 15px 15px 40px 40px;
  padding: 18px 20px 20px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}

.conteneurGameboy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 15px 15px 40px 40px;
  padding: 3px;
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.4),
    rgba(255, 255, 255, 0.1)
  );
  pointer-events: none;
}

/* ========================================
   ZONE ÉCRAN
   ======================================== */
.zoneEcran {
  background: #1a1a1a;
  border-radius: 8px 8px 12px 12px;
  padding: 22px 15px;
  margin-bottom: 12px;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.8);
  position: relative;
}

/* ========================================
   INDICATEUR POWER
   ======================================== */
.indicateurPower {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: absolute;
  top: 5px;
  left: 15px;
  cursor: pointer;
}

.ledPower {
  width: 12px;
  height: 12px;
  background: #c92a2a;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(201, 42, 42, 0.5);
}

.ledPower.on {
  width: 12px;
  height: 12px;
  background: #00ff41;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(139, 195, 74, 0.35);
}

.iconesBatterie {
  display: flex;
  gap: 3px;
  align-items: center;
}

/* CHEVRONS BATTERIE (>) */
.iconeBatterie {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #666;
}

.textePower {
  color: #999;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.textePower:hover {
  transform: translateY(2px);
  color: #00ff41;
}
.ledPower.on ~ .textePower:hover {
  color: #c92a2a;
}
/* ========================================
   ÉCRAN
   ======================================== */
.ecran {
  border-radius: 4px;
  border: 3px solid #0a0a0a;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.ecran::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.ecranNoir {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 100;
}
/* =======================================
 INRO GAMEBOY
 ======================================= */
.intro-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 99;
  display: none;
}

/* ========================================
   CONTENEUR CANVAS
   ======================================== */
.conteneurCanvas {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#canvasJeu {
  width: 100%;
  height: 100%;
}

/* ========================================
   TEXTE GAMEBOY COLOR
   ======================================== */
.texteGameboyColor {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Press Start 2P", cursive;
  font-size: clamp(0.6rem, 2vw, 0.8rem);
  letter-spacing: 1px;
  white-space: nowrap;
  text-align: center;
  z-index: 2;
}

.texteGameboyColor .partieGameboy {
  color: #bfbfbf;
  text-shadow: 1px 1px 0 #000;
}

.texteGameboyColor .partieColor span:nth-child(1) {
  color: #e03a50;
}
.texteGameboyColor .partieColor span:nth-child(2) {
  color: #7e78b8;
}
.texteGameboyColor .partieColor span:nth-child(3) {
  color: #8bc34a;
}
.texteGameboyColor .partieColor span:nth-child(4) {
  color: #f2c94c;
}
.texteGameboyColor .partieColor span:nth-child(5) {
  color: #30b6ad;
}

/* ========================================
   LOGO NINTENDO
   ======================================== */
.containerLogoNintendo {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 15px;
}

.logoNintendoBas {
  color: #2d8b87;
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  font-weight: bold;
  opacity: 0.6;
  display: inline-block;
  justify-content: center;
  border: 2px solid #2d8b87;
  border-radius: 12px;
  padding: 4px 12px;
}

/* ========================================
   HAUT-PARLEURS
   ======================================== */
.hautParleurs {
  position: absolute;
  bottom: 40px;
  right: 20px;
}

.grilleHautParleur {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  align-items: center;
}

.ligneHautParleur {
  display: flex;
  gap: 4px;
}

.trouHautParleur {
  width: 4px;
  height: 4px;
  background: #2d8b87;
  border-radius: 50%;
  opacity: 0.6;
}

/* Trous enfoncés (effet de profondeur) - un sur deux */
.trouHautParleur.enfonce {
  background: #1a5855;
  opacity: 0.8;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
/* ========================================
   CONTROLS ZONE
   ======================================== */
.controls-zone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 35px 0;
  padding: 0 10px;
}

/* ========================================
   D-PAD
   ======================================== */
.dpad {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.dpad-btn {
  position: absolute;
  background: linear-gradient(135deg, #6a6a6a 0%, #4a4a4a 100%);
  border: none;
  box-shadow:
    inset -1px -1px 3px rgba(0, 0, 0, 0.4),
    inset 1px 1px 2px rgba(255, 255, 255, 0.15),
    0 2px 0 #2a2a2a,
    0 3px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.08s ease-out;
  touch-action: manipulation;
}

.dpad-btn:active {
  transform: translateY(1.5px);
  box-shadow:
    inset -1px -1px 3px rgba(0, 0, 0, 0.5),
    inset 1px 1px 2px rgba(255, 255, 255, 0.1),
    0 0.5px 0 #2a2a2a,
    0 1px 2px rgba(0, 0, 0, 0.2);
}

.dpad-up,
.dpad-down {
  width: 35px;
  height: 42px;
  left: 50%;
  transform: translateX(-50%);
}

.dpad-up {
  top: 0;
  border-radius: 4px 4px 0 0;
}

.dpad-up::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #2a2a2a;
  opacity: 0.7;
}

.dpad-up:active {
  transform: translate(-50%, 1.5px);
}

.dpad-down {
  bottom: 0;
  border-radius: 0 0 4px 4px;
}

.dpad-down::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #2a2a2a;
  opacity: 0.7;
}

.dpad-down:active {
  transform: translate(-50%, 1.5px);
}

.dpad-left,
.dpad-right {
  width: 42px;
  height: 35px;
  top: 50%;
  transform: translateY(-50%);
}

.dpad-left {
  left: 0;
  border-radius: 4px 0 0 4px;
}

.dpad-left::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 7px solid #2a2a2a;
  opacity: 0.7;
}

.dpad-left:active {
  transform: translate(1.5px, -50%);
}

.dpad-right {
  right: 0;
  border-radius: 0 4px 4px 0;
}

.dpad-right::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #2a2a2a;
  opacity: 0.7;
}

.dpad-right:active {
  transform: translate(-1.5px, -50%);
}

.dpad-center {
  position: absolute;
  width: 35px;
  height: 35px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #3a3a3a 0%, #2a2a2a 100%);
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ========================================
   BOUTONS A/B
   ======================================== */
.boutonsAB {
  display: flex;
  gap: 12px;
  align-items: center;
  transform: rotate(-25deg);
  padding: 15px;
  flex-shrink: 0;
}

.boutonCirculaire {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #5a5a5a;
  border: none;
  box-shadow:
    inset -3px -3px 6px rgba(0, 0, 0, 0.5),
    inset 2px 2px 3px rgba(255, 255, 255, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #3a3a3a;
  font-size: 16px;
  transition: all 0.1s;
  padding: 0;
  touch-action: manipulation;
}

.boutonCirculaire:active {
  transform: translateY(3px);
  box-shadow:
    inset -3px -3px 6px rgba(0, 0, 0, 0.5),
    inset 2px 2px 3px rgba(255, 255, 255, 0.1),
    0 1px 0 #3a3a3a;
}

/* ========================================
   ZONE SELECT/START
   ======================================== */
.zoneSelectStart {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
}

.boutonPetit {
  width: 60px;
  height: 12px;
  background: #5a5a5a;
  border: none;
  border-radius: 20px;
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 2px 0 #3a3a3a;
  cursor: pointer;
  transition: all 0.1s;
}

.boutonPetit:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 1px 0 #3a3a3a;
}

.labelBouton {
  text-align: center;
  color: #2d8b87;
  font-size: 10px;
  font-weight: bold;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========================================
   UI OVERLAY ELEMENTS
   ======================================== */
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

#game-ui {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  font-family: "Press Start 2P", monospace;
}

#game-ui.active {
  display: block;
}

.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   MENU HAMBURGER
   ======================================== */
#hamburger {
  position: absolute;
  top: 1.5%;
  left: 1.5%;
  height: 6%;
  width: 6%;
  min-height: 20px;
  min-width: 20px;
  max-height: 30px;
  max-width: 30px;
  cursor: pointer;
  z-index: 50;
}

#menu {
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 56, 15, 0.95);
  color: #9bbc0f;
  transition:
    right 0.3s ease-in-out,
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out,
    visibility 0.3s;
  visibility: hidden;
  transform: translateX(500px);
  padding: 5% 5% 8% 5%;
  box-sizing: border-box;

  /* Flexbox pour structurer le menu */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 11;
}

#menu.show {
  right: 0;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Titre en haut */
#menu h2 {
  font-size: clamp(0.9rem, 4.5vw, 1.2rem);
  text-align: center;
  margin: 0;
  padding: 0 0 5% 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* Sections centrales (prennent l'espace disponible) */
.menu-sections {
  display: flex;
  flex-direction: column;
  gap: 8%;
  flex-grow: 1;
  justify-content: center;
}

.menu-section {
  text-align: center;
}

.menu-section h3 {
  font-size: clamp(0.75rem, 3.8vw, 1rem);
  margin: 0 0 4% 0;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3%;
  font-size: clamp(0.6rem, 3.2vw, 0.85rem);
}

.menu-section li {
  display: flex;
  align-items: center;
}

/* Boutons en bas - PLUS PETITS pour mobile 380px */
.menu-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5%;
  flex-shrink: 0;
  padding-top: 5%;
}

.menu-button button {
  min-width: 70px;
  max-width: 110px;
  flex: 1;
  cursor: pointer;
  font-size: clamp(0.55rem, 3vw, 0.75rem);
  border-radius: 6px;
  border: 2px solid #9bbc0f;
  background: #0f380f;
  color: #9bbc0f;
  padding: 1% 4%;
  transition: all 0.15s ease-in-out;
  text-transform: uppercase;
  font-weight: bold;
}

.menu-button button:hover {
  background: #306230;
  color: #9bbc0f;
  box-shadow: 0 0 15px rgba(155, 188, 15, 0.6);
  border-color: #9bbc0f;
  transform: scale(1.05);
}

.menu-button button:active {
  background: #9bbc0f;
  color: #0f380f;
  transform: scale(0.98);
}
/* ========================================
   OVERLAY À PROPOS
   ======================================== */

.apropos-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.apropos-overlay.hidden {
  display: none;
}

.apropos-container {
  width: 90%;
  max-width: 800px;
  height: 85%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 3px solid #ffd700;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

/* Header */
.apropos-header {
  padding: 20px;
  background: linear-gradient(to bottom, #2d2d2d, #1a1a1a);
  border-bottom: 2px solid #ffd700;
  text-align: center;
}

.apropos-header h1 {
  color: #ffd700;
  font-size: 36px;
  font-weight: bold;
  margin: 0 0 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: Arial, sans-serif;
}

.apropos-header p {
  color: #aaa;
  font-size: 18px;
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Contenu scrollable */
.apropos-content {
  flex: 1;
  overflow-y: auto;
  padding: 30px 40px;
  color: #fff;
  line-height: 1.8;
  font-family: Arial, sans-serif;
}

/* Scrollbar personnalisée */
.apropos-content::-webkit-scrollbar {
  width: 10px;
}

.apropos-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.apropos-content::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 5px;
}

.apropos-content::-webkit-scrollbar-thumb:hover {
  background: #ffa500;
}

/* Sections */
.apropos-content section {
  margin-bottom: 35px;
}

.apropos-content h2 {
  color: #ffd700;
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.apropos-content h3 {
  color: #ffa500;
  font-size: 20px;
  font-weight: bold;
  margin: 20px 0 10px 0;
}

.apropos-content p {
  margin: 0 0 15px 0;
  font-size: 16px;
  text-align: justify;
}

.apropos-content .quote {
  font-style: italic;
  color: #ffd700;
  font-size: 18px;
  text-align: center;
  padding: 15px;
  background: rgba(255, 215, 0, 0.1);
  border-left: 4px solid #ffd700;
  margin: 20px 0;
}

.apropos-content ul {
  margin: 10px 0 15px 20px;
  padding-left: 20px;
}

.apropos-content li {
  margin-bottom: 8px;
  font-size: 16px;
}

.apropos-content strong {
  color: #ffd700;
}

/* Images des technologies dans les listes de compétences */
.skills-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.skills-list li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.skills-list li img {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  object-fit: contain;
}

/* Footer */
.apropos-footer {
  padding: 20px;
  background: linear-gradient(to top, #2d2d2d, #1a1a1a);
  border-top: 2px solid #ffd700;
  text-align: center;
}

.apropos-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #ffd700;
  color: #fff;
  padding: 12px 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
}

.apropos-btn:hover {
  background: rgba(255, 215, 0, 0.3);
  border-color: #ffa500;
  color: #ffd700;
  transform: scale(1.05);
}

.apropos-btn .btn-key {
  display: inline-block;
  background: #ffd700;
  color: #000;
  padding: 3px 8px;
  border-radius: 3px;
  margin-right: 8px;
  font-weight: bold;
}
/* ========================================
   OVERLAY MAKING OF - MOBILE FIRST
   ======================================== */

/* BASE - MOBILE */
.makingof-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.makingof-overlay.hidden {
  display: none;
}

.makingof-container {
  width: 95%;
  height: 90%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid #ffd700;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

/* Header */
.makingof-header {
  padding: 15px;
  background: linear-gradient(to bottom, #2d2d2d, #1a1a1a);
  border-bottom: 2px solid #ffd700;
  text-align: center;
}

.makingof-header h1 {
  color: #ffd700;
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 5px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: Arial, sans-serif;
}

.makingof-header p {
  color: #aaa;
  font-size: 14px;
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Contenu scrollable */
.makingof-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 15px;
  color: #fff;
  line-height: 1.6;
  font-family: Arial, sans-serif;
}

/* Scrollbar personnalisée */
.makingof-content::-webkit-scrollbar {
  width: 8px;
}

.makingof-content::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.makingof-content::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 5px;
}

.makingof-content::-webkit-scrollbar-thumb:hover {
  background: #ffa500;
}

/* Sections */
.makingof-content section {
  margin-bottom: 30px;
}

.makingof-content h2 {
  color: #ffd700;
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.makingof-content h3 {
  color: #ffa500;
  font-size: 18px;
  font-weight: bold;
  margin: 15px 0 8px 0;
}

.makingof-content p {
  margin: 0 0 12px 0;
  font-size: 14px;
  text-align: justify;
}

.makingof-content ul {
  margin: 8px 0 12px 15px;
  padding-left: 15px;
}

.makingof-content li {
  margin-bottom: 6px;
  font-size: 14px;
}

.makingof-content strong {
  color: #ffd700;
}

/* ========================================
   GALERIE D'IMAGES - MOBILE
   ======================================== */

.image-gallery {
  margin: 20px 0;
  text-align: center;
}

.gallery-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 3%;
  border: 2px solid #ffd700;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  background: #000;
}

.gallery-image:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
  border-color: #ffa500;
}

.image-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #aaa;
  font-style: italic;
  text-align: center;
}

/* Galerie d'items - MOBILE (1 colonne) */
.items-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.item-image {
  text-align: center;
}

.item-image .gallery-image {
  width: 100%;
}

/* Comparaison Version 1 vs Version 2 - MOBILE (1 colonne) */
.image-comparison {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.comparison-item {
  text-align: center;
}

.comparison-item .gallery-image {
  width: 100%;
}

/* Footer */
.makingof-footer {
  padding: 15px;
  background: linear-gradient(to top, #2d2d2d, #1a1a1a);
  border-top: 2px solid #ffd700;
  text-align: center;
}

.makingof-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #ffd700;
  color: #fff;
  padding: 10px 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
}

.makingof-btn:hover {
  background: rgba(255, 215, 0, 0.3);
  border-color: #ffa500;
  color: #ffd700;
  transform: scale(1.05);
}

/* ========================================
   LIGHTBOX (Modal pour agrandir les images)
   ======================================== */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  border: 2px solid #ffd700;
  border-radius: 6px;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 35px;
  color: #ffd700;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ffa500;
}
/* ========================================
   COEURS DE VIE
   ======================================== */
.health-container {
  position: absolute;
  top: 4%;
  right: 2.5%;
  display: flex;
  gap: 1.2%;
  pointer-events: none;
  z-index: 3;
}

.heart-hud {
  height: clamp(10px, 5.5vw, 14px);
  width: clamp(10px, 5.5vw, 14px);
}

.heart-hud svg {
  width: 100%;
  height: 100%;
  fill: #ff3b5c;
}

/* ==========================================
   INVENTAIRE
   ========================================== */
.inventaire {
  position: absolute;
  top: 10%;
  right: 2.5%;
  display: flex;
  gap: 6px;
  z-index: 5;
  padding: 6px;
  border-radius: 4px;
  opacity: 0; /* Caché par défaut */
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Visible quand le jeu a commencé */
.inventaire.game-started {
  opacity: 1;
  pointer-events: auto;
}

.inventaire-item {
  width: 20px;
  height: 20px;
  display: none; /* Caché par défaut */
  align-items: center;
  justify-content: center;
  background: rgba(155, 188, 15, 0.15);
  border: 2px solid #ff0000;
  border-radius: 3px;
  padding: 3px;
  position: relative;
}

/* Quand l'item est collecté, on l'affiche */
.inventaire-item.collected {
  display: flex;
}

/* Image dans l'inventaire */
.inventaire-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Animation de l'item qui vole vers l'inventaire */
@keyframes flyToInventory {
  0% {
    transform: translate(0, 0) scale(0.5) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: translate(-50px, -100px) scale(1.2) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
    opacity: 1;
  }
}

.inventaire-item.animating .inventaire-img {
  animation: flyToInventory 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ==========================================
   OVERLAY SIMPLE (OBJETS/ITEMS)
   ========================================== */
.simple-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.simple-overlay.hidden {
  display: none;
}

.simple-box {
  background: rgba(15, 56, 15, 0.98);
  border: 2px solid #9bbc0f;
  border-radius: 6px;
  box-shadow: 0 0 15px rgba(155, 188, 15, 0.3);
  width: 85%;
  max-width: 400px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simple-message {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.3;
  color: #9bbc0f;
  text-align: center;
}

.simple-btn {
  cursor: pointer;
  font-size: 0.6rem;
  border-radius: 4px;
  border: 2px solid #9bbc0f;
  background: #0f380f;
  color: #9bbc0f;
  padding: 5px 10px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  align-self: center;
}

.simple-btn.hidden {
  display: none;
}

.simple-btn:active {
  background: #9bbc0f;
  color: #0f380f;
}

/* ==========================================
   OVERLAY DIALOGUE (PERSONNAGES)
   ========================================== */
.dialogue-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.dialogue-overlay.hidden {
  display: none;
}

.dialogue-box {
  background: rgba(15, 56, 15, 0.98);
  border: 2px solid #9bbc0f;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(155, 188, 15, 0.3);
  width: 90%;
  height: 90%;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Header - reste fixe en haut */
.dialogue-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(155, 188, 15, 0.3);
  flex-shrink: 0;
}

.dialogue-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(155, 188, 15, 0.2);
  border-radius: 50%;
  border: 2px solid #9bbc0f;
  flex-shrink: 0;
}

.dialogue-icon-img {
  width: 16px;
  height: 16px;
  object-fit: cover;
  border-radius: 50%;
}

.dialogue-name {
  margin: 0;
  font-size: 0.6rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

/* Content - prend tout l'espace disponible */
.dialogue-content {
  flex: 1;
  padding: 5px 0;
  overflow-y: auto;
  display: flex;
  align-items: center;
}

.dialogue-message {
  margin: 0;
  font-size: 0.5rem;
  line-height: 1;
  color: #9bbc0f;
  width: 100%;
}

/* Footer - reste fixe en bas */
.dialogue-footer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(155, 188, 15, 0.3);
  flex-shrink: 0;
}

.dialogue-btn {
  cursor: pointer;
  font-size: 0.55rem;
  border-radius: 3px;
  border: 2px solid #9bbc0f;
  background: #0f380f;
  color: #9bbc0f;
  padding: 6px 10px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dialogue-btn:active {
  background: #9bbc0f;
  color: #0f380f;
}

.btn-choice {
  width: 100%;
  justify-content: flex-start;
}

/* ==========================================
   PILULE ROUGE
   ========================================== */
.dialogue-btn.pilule-rouge {
  border-color: #c94444;
  color: #ff8888;
}

.dialogue-btn.pilule-rouge:active {
  background: #c94444;
  color: #0f380f;
}

/* ==========================================
   PILULE BLEUE
   ========================================== */
.dialogue-btn.pilule-bleue {
  border-color: #5599cc;
  color: #88bbff;
}

.dialogue-btn.pilule-bleue:active {
  background: #5599cc;
  color: #0f380f;
}

.btn-key {
  display: inline-block;
}

/* ==========================================
   RIDEAU DE FIN (CURTAIN) - MOBILE FIRST
   ========================================== */
.curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: curtainFall 3s ease-out forwards;
  overflow: hidden;
}

@keyframes curtainFall {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ========== BASE (MOBILE) ========== */
.curtain-content {
  font-family: "Press Start 2P", system-ui;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  width: 100%;
  height: 100%;
}

.curtain-content p {
  font-family: "Press Start 2P", system-ui;
  color: #ffffff;
  font-size: 0.7rem;
  text-align: center;
  line-height: 1.8;
  margin: 0;
  padding: 0 15px;
}

/* Style du coeur */
.heart {
  display: inline-block;
  margin: 10px 0;
}

.heart svg {
  width: 24px;
  height: 24px;
  animation: heartbeat 1.5s ease-in-out infinite;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

/* Container des boutons de fin */
.endButtons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 320px;
  padding: 0 20px;
}

/* Style uniforme pour tous les boutons */
.endButtons .btn,
.endButtons .openCVButton {
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border: 3px solid #2d5016;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  text-align: center;
  background: linear-gradient(to bottom, #1a5c1a 0%, #0f380f 100%);
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow:
    0 4px 0 #2d5016,
    0 6px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  top: 0;
}

/* Effet au survol */
.endButtons .btn:hover,
.endButtons .openCVButton:hover {
  background: linear-gradient(180deg, #8bc34a 0%, #689f38 100%);
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #2d5016,
    0 8px 12px rgba(0, 0, 0, 0.4);
}

/* Effet au clic - Style "enfoncé" */
.endButtons .btn:active,
.endButtons .openCVButton:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #2d5016,
    0 3px 4px rgba(0, 0, 0, 0.3);
}

/* Animation du coeur */
@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  10%,
  30% {
    transform: scale(1.2);
  }
  20%,
  40% {
    transform: scale(1);
  }
}

/* ========================================
   RESPONSIVE - TABLETTE (≥ 750px)
   ======================================== */
@media (min-width: 750px) {
  .conteneurGameboy {
    max-width: 600px;
    padding: 35px;
  }

  .zoneEcran {
    padding: 30px;
  }

  /* ========================================
   LOGO NINTENDO
   ======================================== */
  .containerLogoNintendo {
    margin-top: 30px;
  }

  .logoNintendoBas {
    border: 2px solid #2d8b87;
    border-radius: 12px;
    padding: 4px 12px;
  }
  .hautParleurs {
    bottom: 45px;
    right: 25px;
  }

  #menu {
    padding: 3% 5% 5% 5%;
  }

  .menu-section ul {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2%;
  }

  .inventaire {
    top: 10%;
    right: 2.5%;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
  }

  .inventaire-item {
    width: 35px;
    height: 35px;
    border: 3px solid #ff0000;
    border-radius: 4px;
    padding: 5px;
  }

  /* OVERLAY SIMPLE */
  .simple-box {
    width: 75%;
    max-width: 450px;
    padding: 16px;
    gap: 10px;
  }

  .simple-message {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .simple-btn {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  /* OVERLAY DIALOGUE */
  .dialogue-box {
    width: 80%;
    max-width: 500px;
    height: 85%;
    padding: 12px;
    gap: 8px;
  }

  .dialogue-header {
    gap: 8px;
    padding-bottom: 8px;
  }

  .dialogue-icon {
    width: 28px;
    height: 28px;
  }

  .dialogue-icon-img {
    width: 24px;
    height: 24px;
  }

  .dialogue-name {
    font-size: 0.75rem;
  }

  .dialogue-content {
    flex: 1;
    padding: 8px 0;
  }

  .dialogue-message {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .dialogue-footer {
    gap: 8px;
    padding-top: 8px;
  }

  .dialogue-btn {
    font-size: 0.7rem;
    padding: 9px 14px;
  }

  /* RIDEAU DE FIN */
  .curtain-content {
    gap: 30px;
    padding: 40px;
    max-width: 700px;
  }

  .curtain-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 0 30px;
  }

  .heart {
    margin: 15px 0;
  }

  .heart svg {
    width: 28px;
    height: 28px;
  }

  .endButtons {
    gap: 16px;
    max-width: 400px;
  }

  .endButtons .btn,
  .endButtons .openCVButton {
    padding: 14px 28px;
    font-size: 13px;
  }

  .makingof-container {
    width: 90%;
    height: 85%;
    border: 3px solid #ffd700;
    border-radius: 10px;
  }

  .makingof-header {
    padding: 20px;
  }

  .makingof-header h1 {
    font-size: 32px;
    margin: 0 0 8px 0;
  }

  .makingof-header p {
    font-size: 16px;
  }

  .makingof-content {
    padding: 25px 30px;
    line-height: 1.7;
  }

  .makingof-content::-webkit-scrollbar {
    width: 10px;
  }

  .makingof-content h2 {
    font-size: 24px;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
  }

  .makingof-content h3 {
    font-size: 19px;
    margin: 18px 0 10px 0;
  }

  .makingof-content p {
    font-size: 15px;
    margin: 0 0 14px 0;
  }

  .makingof-content ul {
    margin: 10px 0 14px 18px;
    padding-left: 18px;
  }

  .makingof-content li {
    margin-bottom: 7px;
    font-size: 15px;
  }

  .image-gallery {
    margin: 22px 0;
  }

  .gallery-image {
    max-width: 600px;
    border: 3px solid #ffd700;
    border-radius: 8px;
  }

  .image-caption {
    font-size: 13px;
    margin-top: 10px;
  }

  /* Galerie d'items - 2 colonnes sur tablette */
  .items-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  /* Comparaison V1/V2 - 2 colonnes sur tablette */
  .image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .makingof-footer {
    padding: 20px;
  }

  .makingof-btn {
    padding: 12px 30px;
    font-size: 18px;
  }

  .lightbox img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #ffd700;
    border-radius: 8px;
  }

  .lightbox-close {
    top: 25px;
    right: 35px;
    font-size: 40px;
  }
}

/* ========================================
   RESPONSIVE - DESKTOP (≥ 1024px)
   ======================================== */
@media (min-width: 1024px) {
  body {
    padding: 40px 20px;
  }

  .conteneurGameboy {
    max-width: 700px;
    padding: 30px;
  }

  .zoneEcran {
    padding: 35px;
  }

  .hautParleurs {
    bottom: 50px;
    right: 30px;
  }

  .inventaire {
    top: 10%;
    right: 2.5%;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
  }

  .inventaire-item {
    width: 45px;
    height: 45px;
    border: 4px solid #ff0000;
    border-radius: 5px;
    padding: 6px;
  }

  .menu-button {
    gap: 3%;
  }

  .menu-button button {
    min-width: 70px;
    max-width: 180px;
    flex: 1;
    cursor: pointer;
    font-size: clamp(0.55rem, 3vw, 0.75rem);
    border-radius: 6px;
    border: 2px solid #9bbc0f;
    background: #0f380f;
    color: #9bbc0f;
    padding: 1% 4%;
    transition: all 0.15s ease-in-out;
    text-transform: uppercase;
    font-weight: bold;
  }

  /* OVERLAY SIMPLE */
  .simple-box {
    width: 65%;
    max-width: 500px;
    padding: 20px;
    gap: 12px;
  }

  .simple-message {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .simple-btn {
    font-size: 0.85rem;
    padding: 10px 20px;
  }

  /* OVERLAY DIALOGUE */
  .dialogue-box {
    width: 70%;
    max-width: 580px;
    height: 80%;
    padding: 16px;
    gap: 10px;
  }

  .dialogue-header {
    gap: 10px;
    padding-bottom: 10px;
  }

  .dialogue-icon {
    width: 34px;
    height: 34px;
  }

  .dialogue-icon-img {
    width: 30px;
    height: 30px;
  }

  .dialogue-name {
    font-size: 0.85rem;
  }

  .dialogue-content {
    flex: 1;
    padding: 10px 0;
  }

  .dialogue-message {
    font-size: 0.85rem;
    line-height: 1;
  }

  .dialogue-footer {
    gap: 10px;
    padding-top: 10px;
  }

  .dialogue-btn {
    font-size: 0.8rem;
    padding: 11px 18px;
  }

  /* RIDEAU DE FIN */
  .curtain-content {
    gap: 40px;
    padding: 60px;
    max-width: 800px;
  }

  .curtain-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    padding: 0 40px;
  }

  .heart {
    margin: 20px 0;
  }

  .heart svg {
    width: 32px;
    height: 32px;
  }

  .endButtons {
    gap: 20px;
    max-width: 500px;
  }

  .endButtons .btn,
  .endButtons .openCVButton {
    padding: 16px 36px;
    font-size: 15px;
  }

  .makingof-container {
    max-width: 900px;
  }

  .makingof-header h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
  }

  .makingof-header p {
    font-size: 18px;
  }

  .makingof-content {
    padding: 30px 40px;
    line-height: 1.8;
  }

  .makingof-content section {
    margin-bottom: 35px;
  }

  .makingof-content h2 {
    font-size: 26px;
    margin: 0 0 15px 0;
  }

  .makingof-content h3 {
    font-size: 20px;
    margin: 20px 0 10px 0;
  }

  .makingof-content p {
    font-size: 16px;
    margin: 0 0 15px 0;
  }

  .makingof-content ul {
    margin: 10px 0 15px 20px;
    padding-left: 20px;
  }

  .makingof-content li {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .image-gallery {
    margin: 25px 0;
  }

  .image-caption {
    font-size: 14px;
  }

  /* Galerie d'items - 3 colonnes sur desktop */
  .items-gallery {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .lightbox-close {
    top: 30px;
    right: 40px;
  }
}
