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

/* --- VARIABLES GLOBALES --- */
:root {
  --main-bg-color: #0d0d0d;
  --accent-color: #5c07ab;
  --text-color: #ffffff;
  --secondary-text-color: #ccc;
  --font-family: 'Montserrat', sans-serif;
  --transition-speed: 0.3s;
}

/* --- STYLES DE BASE --- */
body {
  /* Fond noir + image en "contain" pour éviter la découpe */
  background: black; /* Couleur de fond par défaut pour les bords */
  background-image: url('images/dark-bg.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain; 
  background-attachment: fixed;
  
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  scroll-behavior: smooth;
}

/* --- CONTENEUR CENTRALISÉ --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- HEADER --- */
header {
  padding: 2rem 0 1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
}
.title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}
.subtitle {
  font-size: 1.4rem;
  color: var(--secondary-text-color);
}

/* --- MAIN --- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

/* --- SECTION DES RÉSEAUX SOCIAUX --- */
.social-section {
  text-align: center;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}
.social-icon {
  display: inline-block;
  transition: transform var(--transition-speed) ease,
              box-shadow var(--transition-speed) ease;
}
.social-icon img {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 0 5px var(--accent-color));
}
.social-icon:hover img {
  transform: scale(1.3) rotate(8deg);
  box-shadow: 0 0 15px var(--accent-color);
}

/* --- FOOTER --- */
footer {
  padding: 1rem 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  color: var(--secondary-text-color);
}

/* --- ANIMATIONS --- */
.fade-in-down {
  opacity: 0;
  animation: fadeDown 1s forwards ease;
}
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeUp 1s forwards ease;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- DESIGN RESPONSIVE --- */
@media (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1.2rem;
  }
  .social-icon img {
    width: 50px;
    height: 50px;
  }

  /* Décale légèrement le contenu à gauche et aligne le texte */
  .container {
    margin-left: -20px;
    text-align: left;
  }
}


body {
  margin: 0;
  overflow: hidden; /* Empêche le scroll sur mobile en swipant */
  background-color: #1e1e1e;
  color: white;
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#game-container {
  text-align: center;
  width: 100%;
  max-width: 400px;
}

#card-container {
  width: 300px;
  height: 400px;
  margin: 20px auto;
  position: relative;
}

.carte {
  width: 100%;
  height: 100%;
  background-color: #fff;
  color: black;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  cursor: grab;
  user-select: none; /* Empêche de surligner le texte en glissant */
  transition: transform 0.3s ease-out; /* Animation pour le retour au centre */
}

/* Classe ajoutée par JS quand on clique pour enlever l'animation de retour */
.carte.dragging {
  transition: none; 
  cursor: grabbing;
}

.carte img {
  width: 100%;
  height: 80%;
  object-fit: cover; /* Recadre l'image proprement */
  border-radius: 15px 15px 0 0;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 0 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

#score-board {
  margin-top: 20px;
  font-size: 18px;
}