/* Import de la police Silkscreen */
@import url('https://fonts.googleapis.com/css2?family=Silkscreen&display=swap');

/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Silkscreen', cursive;
  cursor: url("/assets/mouse1.png"), auto;
}

a, button, .clickable, img {
  cursor: url("/assets/mouse2.png"), pointer;
}

/* STYLE GÉNÉRAL DU BODY */
body {
  background-color: white;
  background-repeat: repeat;
  color: #333;
  line-height: 1.6;
  padding: 20px;
  image-rendering: pixelated;
}

/* CONTENEUR PRINCIPAL */
#main-content {
  background-color: rgba(255, 255, 255, 0.95);
  border: 2px solid #ddd;
  width: 90%;
  max-width: 800px;
  margin: 30px auto;
  padding: 30px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}

/* NAVIGATION */
nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

nav a {
  color: #333;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 16px;
  border: 2px solid #333;
  background: white;
  transition: all 0.2s;
}

nav a:hover {
  background: #f0f0f0;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}

/* TITRES */
h1, h2, h3 {
  color: #333;
  margin-bottom: 20px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 30px;
  letter-spacing: 1px;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 2px dotted #333;
  padding-bottom: 10px;
  margin-top: 40px;
}

h3 {
  font-size: 1.3rem;
  margin-top: 30px;
}


/* GRILLES DE PROJETS & POSTS */
.project-grid, .post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* BOÎTE DE PROJET / POST */
.project, .post {
  background: white;
  border: 2px solid #333;
  padding: 15px;
  transition: all 0.2s;
}

.project:hover, .post:hover {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.1);
}

/* IMAGE DE PROJET / POST */
.project-image, .post-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 2px solid #333;
  margin-bottom: 15px;
  image-rendering: pixelated;
}

/* TITRE DE PROJET / POST */
.project-title, .post-title {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-align: center;
}

/* BOUTONS */
.btn {
  display: inline-block;
  padding: 8px 16px;
  background: white;
  color: #333;
  text-decoration: none;
  border: 2px solid #333;
  font-size: 14px;
  transition: all 0.2s;
  margin-top: 10px;
}

.btn:hover {
  background: #333;
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}

/* BOUTON DE RETOUR POUR POSTS */
.back-btn {
  margin-top: 30px;
  text-align: center;
}

/* MÉTADONNÉES DU POST */
.post-meta {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-bottom: 30px;
}

/* CONTENU DU POST */
.post-content {
  margin-bottom: 40px;
}

.post-content p {
  margin-bottom: 15px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border: 2px solid #333;
  margin: 20px auto;
  display: block;
  image-rendering: pixelated;
}

/* PIED DE PAGE */
footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 2px dotted #333;
  color: #666;
}

.footer-btn {
  display: inline-block;
  margin-top: 20px;
  transition: transform 0.2s;
}

.footer-btn:hover {
  transform: translate(-2px, -2px);
}

/* INFOS BULLES (TOOLTIP) */
.tooltip {
  position: relative;
  border-bottom: 1px dotted #333;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #333;
  border: 2px solid #333;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
}

/* EXPLICATION CACHÉE (POSTS) */
.explanation {
  display: none;
  background: white;
  color: #333;
  border: 2px solid #333;
  padding: 10px;
  margin: 10px 0;
  max-width: 300px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  #main-content {
    padding: 20px;
    width: 95%;
  }

  .project-grid, .post-grid {
    grid-template-columns: 1fr;
  }
}
