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

body {
  background-image: url("images/back.jpg");
  color: #DCDAD3;
  line-height: 1.7;
  font-size: 1.3em;
  font-family: 'Corbel';
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  min-height: 100svh;
}

/* ==== LAYOUT ==== */
main {
  padding-top: 80px;
  margin-top: 50px; /* adjust if header height changes */
}

/* ==== MAIN SECTIONS ==== */
main section {
  position: relative;
  padding: 10px 30px;
  margin: 0 auto;
  max-width: 50%;
  border-bottom: 1px solid #333;
  line-height: 1.3;
  /* retirer z-index explicite si vous l'aviez ; inutile ici */
}

/* alternance de fonds (inchangé) */
main section:nth-child(odd) {
  background-color: rgba(20, 20, 26, 0.7);
  backdrop-filter: blur(2px);
}
main section:nth-child(even) {
  background-color: rgba(20, 20, 26, 0.9);
  backdrop-filter: blur(2px);
}

/* section headings */
main section h2 {
  color: #e7bb41;
  text-align: center;
  font-family: 'Corbel';
  font-size: 1.5em;
  margin-top: 10px;
  margin-bottom: 20px; /* espace entre le titre et le texte */
}

main section h4 {
  display: inline !important;
}

main section p,
main section em {
  font-size: 1.3em;
  text-align: center;
}

main section em {
  text-decoration: underline;
}

/* lists */
.section-content ul {
  list-style: square outside;
  margin: 0;
  padding: 0;
}

.section-content li {
  margin-bottom: 1%;
}

/* ==== CONTENT LAYOUT ==== */
.section-content .text {
  text-align: left;
  margin-bottom: 20px; /* espace entre texte et image */
}

.section-content .image,
.section-content .logo {
  text-align: center;
}

/* images */
.section-content .image img,
.section-content .logo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.section-content .image img {
  max-width: 550px;
}

.section-content .logo img {
  max-width: 250px;
  box-shadow: none;
}


.section-content .image {
  position: relative;
  width: 100%;
  max-width: 550px; /* tu peux adapter cette limite */
  margin: 0 auto;
  overflow: hidden; /* empêche tout dépassement */
}

#game-container canvas {
  width: 100% !important; /* le canvas prend toute la largeur du conteneur */
  height: auto !important; /* conserve le ratio */
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}



/* ==== LINKS ==== */
a {
  color: #e0d4b2;
  transition: color 0.3s ease;
}
a:hover {
  text-decoration: underline;
}

.socials {
  display: flex;
  justify-content: center; /* centre horizontalement tous les enfants */
  align-items: center;     /* centre verticalement si nécessaire */
  flex-wrap: wrap;         /* pour que ça passe sur plusieurs lignes si petit écran */
  margin: 20px 0;          /* optionnel : espace autour de la section */
}

.socials a {
  font-size: 0.8em;
  color: #DCDAD3;
  margin: 0 10px; /* espace entre chaque lien */
}

.socials img {
  width: 32px;
  height: 32px;
  display: block; /* évite les petits décalages inline */
}

.active {
  text-decoration: none;
}

/* ==== GALLERY ==== */
.gallery-section {
  position: relative;
  z-index: 0;        /* bas par défaut pour éviter conflits */
  overflow: visible; /* très important : laisse l'enfant dépasser */
}

/* quand l'utilisateur interagit avec la section, on la "remonte" au-dessus des autres */
.gallery-section:hover {
  z-index: 9999;     /* élève la section courante au-dessus des autres */
}

/* contenu */
.gallery-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-items: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow: visible; /* ne pas clipper l'image agrandie */
}

.gallery-item {
  position: relative;
  overflow: visible; /* s'assure qu'aucun container ne clippe */
}

/* images */
.gallery-item img {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 15px;
  border: 5px solid black;
  box-shadow: 0 0 10px rgba(0,0,0,1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;                /* z-index local */
  transform-origin: center center;
  will-change: transform;
}

/* hover — garde un z-index très élevé localement */
.gallery-item img:hover,
.gallery-item img:active {
  transform: scale(3);     /* ajustez (2–3) selon le rendu souhaité */
  box-shadow: 0 0 25px rgba(0,0,0,0.7);
  border-radius: 15px;
    border: 5px solid black;
  z-index: 10000;            /* s'assure d'être au-dessus à l'intérieur de la section */
}

/* ==== HEADER ==== */
.site-header {
  color: #e7bb41;
  position: absolute;
  top: 0;
  width: 100%;
  text-align: center;
  z-index: 1000;
  font-family: 'Eczar';
  font-size: 1em;
  line-height: 1;
  padding: 10px 10px 25px;
}

.site-header h1 {
  font-family: 'Eczar';
  font-size: 2.5em;
  font-weight: normal;
  color: #e7bb41;
  text-align: center;
  margin: 0 0 10px 0;
  -webkit-text-stroke: 1px #e7bb41;
  text-shadow: 0 0 2px #e7bb41, 0 0 2px #e7bb41, 0 0 3px #e7bb41;
}

.site-header h2 {
  margin: 0 0 15px 0;
  color: #ABA49B;
  font-family: 'Eczar';
  font-size: 1.1em;
  font-weight: normal;
}

/* ==== FONTS ==== */
@font-face {
  font-family: Eczar;
  src: url("Eczar.ttf");
}
@font-face {
  font-family: Corbel;
  src: url("corbel.ttf");
}

/* ==== FOOTER ==== */
footer {
  color: #b3b3b3;
  text-align: center;
  width: 100%;
}

/* ==== MARK STYLES ==== */
mark.baroudeur { color: #f66960; background: none; }
mark.chercheuse { color: #2A95E2; background: none; }
mark.seducteur { color: #E0AA0A; background: none; }
mark.reveuse { color: #CB96EF; background: none; }

/* ==== UTILITIES ==== */
.underline { text-decoration: underline; }





@media (max-width: 1200px) {

  body {
    line-height: 1.3;
  }

  main section {
    max-width: 75%;
  }

  .gallery-content {
    grid-template-columns: 1fr; /* 1 colonne */
  }

  .section-content .image img,
  .gallery-item img {
    width: 100%;
    max-width: 450px; /* limite raisonnable */
    height: auto;
  }

  /* Zoom réduit sur hover */
  .gallery-item img:hover,
  .gallery-item img:active {
    transform: scale(1.7);
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
  }

  /* Titres de sections */
  main section h2 {
    text-align: center;
    font-size: 1.1em;
  }

  /* Textes de section */
  main section p {
    font-size: 1.1em;
    text-align: center;
    text-wrap: balance;
  }

  /* ==== FOOTER ==== */
  footer {
    font-size: 0.7em;
  }
}







@media (max-width: 700px) {

  /* Désactivation du zoom au hover (mobile) */
  .gallery-item img:hover,
  .gallery-item img:active {
    transform: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 1;
    cursor: default;
  }

  body {
    line-height: 1.3;
    margin: 0;
    padding: 0;
  }

  main {
    width: 100%;
  }

  main section {
    max-width: 100%;
  }

  .gallery-content {
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
  }

  .section-content .image img,
  .gallery-item img {
    width: 100%;
    max-width: 450px; /* limite large mais reste fluide */
    height: auto;
  }

  /* Titres de sections */
  main section h2 {
    text-align: center;
    font-size: 1.1em;
  }

  /* Textes de section */
  main section p {
    font-size: 1.1em;
    text-align: center;
    text-wrap: balance;
  }

  /* ==== HEADER ==== */
  .site-header {
    top: 0;
    font-size: 1em;
    line-height: 1.3;
    padding: 10px 10px 25px;
  }

  .site-header h1 {
    padding-bottom: 10px;
    font-size: 1.6em;
  }

  .site-header h2 {
    margin: 0 0 0 0; /* évite répétitions */
    padding-top: 0;
    font-family: 'Eczar';
    font-size: 0.8em;
    font-weight: normal;
  }

  /* ==== FOOTER ==== */
  footer {
    font-size: 0.6em;
  }
}
