@charset "UTF-8";

@font-face {
  font-family: "monospace";
  src: url(../fonts/Monospace821BT-Roman.otf);
}

body {
  margin: 0;
  padding: 0;
  font-family: "monospace";
  background-color: #f0f0f0; /* Gris clair */
  box-sizing: border-box;
  overflow: hidden;
  height: 100vh;
}

/* Styles pour l'en-tête */
header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 18px;
  height: calc(5vh - 2 * 15px);
  background-color: transparent;
  position: relative;
  z-index: 3;
}

/* Styles pour le titre */
.title1 {
  font-size: 18px;
  color: black;
}

.title2 {
  font-size: 18px;
  color: black;
  margin-left: 30px;
  cursor: pointer;
}

.title-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 25vw;
}

.title-list li {
  font-size: 10px;
  color: black;
  margin-bottom: 5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  flex-wrap: wrap;
}

.title-list li:hover {
  opacity: 0.7;
}

.title-list li.inactive {
  color: #ccc;
  transition: color 0.15s ease;
}

.hidden {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Style facultatif pour les mots visibles */
.visible {
  display: inline;
  color: black;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.right-text {
  padding: 15px;
  /* position: absolute; */
  /* text-align: left; */
  font-family: "monospace";
  font-size: 10px;
  color: black;
  display: none;
  white-space: normal;
}
.image-container img {
  /* position: relative; */
  /* top: 0; */
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.image-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(50vw - 36px);
  height: calc(100vh - 36px);
  overflow: hidden;
  z-index: 1;
}

.image-container video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ajuste la vidéo dans le conteneur sans couper */
}

.description {
  position: fixed;
  left: calc(50% + (50vw - 36px) / 2 + 15px);
  top: 50%;
  transform: translateY(-50%);
  width: 25vw;
  height: calc(100vh - 36px);
  z-index: 2;
  overflow-y: auto;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
}

@media (max-width: 600px) {
  header {
    margin: 15px;
  }

  body {
    padding: 15px;
    overflow-y: auto;
  }

  main {
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .image-container {
    width: calc(100vw - 30px);
    height: calc(50vh - 30px);
    top: 70px;
    transform: translateX(-50%);
    position: relative;
  }

  .description {
    position: absolute;
    top: 20px;
    left: 15px;
    width: calc(100vw - 30px);
    transform: none;
  }

  .title-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .title-list li {
    margin-bottom: 0;
    flex-shrink: 0;
    font-size: 14px;
  }

  /* Met le texte (data-text) sous l'image sur mobile */
  .right-text {
    width: calc(100vw - 60px);
    margin: 10px 30px 0 30px;
    padding: 0;
    position: absolute;
    top: calc(65px + 50vh + 10px);
    left: 0;
    font-size: 12px;
    line-height: 1.1;
  }

  /* Cacher les titres à côté des numéros sur mobile */
  .title-list li span.hidden {
    display: none !important;
  }

  /* Afficher le titre au-dessus de la description sur mobile */
  .right-text::before {
    content: attr(data-title);
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
  }

  /* Empiler les liens de contact en colonne sur mobile */
  .about-contact {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    margin: auto 0; /* centre verticalement dans la colonne */
  }

  .about-contact a {
    display: block;
    text-align: center;
    margin: 0 auto;
  }
}

li:hover span.hidden {
  display: block;
  opacity: 1;
}

/* Permettre au texte du titre de passer à la ligne sous le numéro */
.title-list li span {
  white-space: normal;
  word-break: break-word;
  width: 100%;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(240, 240, 240, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out;
  z-index: 9;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.about {
  width: 800px;
  height: 505px;
  background-color: rgba(210, 210, 210, 0.8);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out,
    visibility 0.4s ease-in-out;
  z-index: 10;
  opacity: 0;
  backdrop-filter: blur(5px);
  visibility: hidden;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 600px) {
  .about {
    width: calc(100vw - 60px);
    max-width: 600px;
    height: auto;
    max-height: calc((100vh - 60px) * 0.6);
    overflow-y: auto;
    padding: 9px;
  }

  /* Réduction proportionnelle des textes et espacements dans la modale */
  .about h2 {
    font-size: 11px;
    line-height: 1.2;
  }


  .about-header,
  .about-contact,
  .about-footer {
    padding: 12px;
    margin: 6px;
  }
}

.about.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.about-header {
  text-align: center;
  margin-bottom: 25px;
}

.about-header h2 {
  margin-bottom: calc(18px * 0.2);
}

.about-header p {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.about-contact a {
  text-decoration: none;
  color: black;
}

.about-footer {
  text-align: center;
}

.about-footer h2 {
  margin-bottom: calc(18px * 0.2);
}

.about-footer p {
  line-height: 1.4;
}

.title2:hover {
  cursor: pointer;
}

.close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.close-button:hover {
  opacity: 1;
}

.bottom-text {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
  z-index: 11;
}

body:has(.about.active) .bottom-text {
  opacity: 1;
  visibility: visible;
}

.about {
  width: calc(100vw - 60px);
  max-width: 600px;
  height: auto;
  max-height: calc((100vh - 60px) * 0.6);
  overflow-y: auto;
  padding: 9px;
}

.about h2 {
  font-size: 17px;
  line-height: 1.2;
}

.about p,
.about a {
  font-size: 12px;
  line-height: 1.3;
}

.about-header,
.about-footer {
  padding: 13px;
  margin: 6px;
}

.about-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.about-contact a {
  display: block;
  text-align: center;
  margin: 0 auto;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

