
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, serif;
  color: #3d291b;
}

/* Notre table d'autrice */
.table-autrice {
  min-height: 100vh;
  background-image: url("../images/table.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 45px 30px;
}

/* Titre de la page */
h1 {
  margin: 0;
  color: #f5dfb7;
  font-size: clamp(30px, 4vw, 52px);
  text-align: center;
  text-shadow: 2px 3px 8px #180d08;
}

/* Disposition des trois documents */
.documents {
  width: 100%;
  max-width: 1150px;
  flex: 1;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 35px;
}

/* Présentation des photographies */
.document {
  position: relative;
  width: 30%;
  height: 290px;
  padding: 8px;

  background: #e9dfc9;
  border: 1px solid #b8a78a;
  box-shadow: 8px 12px 20px rgba(0, 0, 0, 0.45);

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.document img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Post-it à gauche */
.postits {
  transform: rotate(-5deg);
  height: 260px;
}

/* Cahier au centre */
.cahier {
  transform: rotate(2deg);
  height: 350px;
}

/* Croquis à droite */
.croquis {
  transform: rotate(5deg);
  height: 290px;
}

/* Étiquettes sous les photographies */
.etiquette {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);

  padding: 8px 18px;
  background: #d7b985;
  border: 1px solid #9d7747;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.35);

  font-family: Georgia, serif;
  font-size: 17px;
  color: #4b301c;
  white-space: nowrap;
}

/* Effets au survol */
.document:hover {
  box-shadow: 10px 15px 25px rgba(0, 0, 0, 0.55);
}

.postits:hover {
  transform: rotate(-5deg) translateY(-6px);
}

.cahier:hover {
  transform: rotate(2deg) translateY(-6px);
}

.croquis:hover {
  transform: rotate(5deg) translateY(-6px);
}

/* Adaptation aux téléphones */
@media (max-width: 750px) {
  .table-autrice {
    padding: 25px 15px;
  }

  .documents {
    flex-direction: column;
    gap: 65px;
    padding: 50px 0;
  }

  .document {
    width: min(85%, 360px);
    height: 260px;
  }

  .cahier {
    height: 320px;
  }
}

/* Les documents deviennent cliquables */

.document {
  font-family: Georgia, serif;
  color: #3d291b;
  cursor: pointer;
}

.document:focus-visible {
  outline: 3px solid #f5dfb7;
  outline-offset: 7px;
}

/* Fenêtre des archives */

.fenetre-archives {
  width: min(92vw, 900px);
  max-height: 88vh;
  padding: 0;
  border: 5px solid #8c673e;
  border-radius: 8px;
  background: #e9d8b5;
  color: #3d291b;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.75);
  overflow: auto;
}

.fenetre-archives::backdrop {
  background: rgba(15, 9, 5, 0.78);
}

.interieur-archives {
  padding: 38px 30px 30px;
  text-align: center;
}

.interieur-archives h2 {
  margin: 0 35px 12px;
  font-size: clamp(25px, 4vw, 35px);
  color: #62401f;
}

.intro-archives {
  max-width: 700px;
  margin: 0 auto 25px;
  line-height: 1.7;
  font-style: italic;
}

.fermer-archives {
  position: sticky;
  top: 10px;
  float: right;
  margin: 10px 12px -45px 0;
  z-index: 5;
  border: 1px solid #96744b;
  border-radius: 50%;
  background: #d8bb8d;
  color: #4b301c;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
}

/* Choix des villages */

.choix-villages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 30px 0;
}

.choix-villages[hidden],
.galerie-archives[hidden],
.retour-villages[hidden] {
  display: none;
}

.bouton-village {
  min-width: 170px;
  padding: 20px 25px;
  border: 2px solid #a38258;
  background: #d9c19a;
  color: #4c301b;
  font-family: Georgia, serif;
  font-size: 21px;
  cursor: pointer;
  box-shadow: 3px 5px 9px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.bouton-village:hover {
  transform: translateY(-4px);
  background: #ead3ab;
}

/* Galerie des documents */

.galerie-archives {
  text-align: center;
}

.galerie-archives h3 {
  font-size: 22px;
  color: #684728;
  margin: 15px 0;
}

#image-archives {
  display: block;
  max-width: 100%;
  max-height: 55vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 15px auto;
  border: 5px solid #f4e9d2;
  box-shadow: 4px 6px 15px rgba(0,0,0,0.3);
}

.legende-image {
  max-width: 700px;
  margin: 15px auto;
  font-size: 16px;
  line-height: 1.6;
}

/* Navigation entre les images */

.navigation-images {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
}

.navigation-images button,
.retour-villages {
  padding: 10px 16px;
  border: 1px solid #947149;
  background: #d8bb8d;
  color: #4b301c;
  font-family: Georgia, serif;
  font-size: 15px;
  cursor: pointer;
}

.navigation-images button:hover,
.retour-villages:hover {
  background: #e8ce9f;
}

.navigation-images button:disabled {
  opacity: 0.4;
  cursor: default;
}

.retour-villages {
  margin-top: 25px;
}

@media (max-width: 600px) {
  .interieur-archives {
    padding: 32px 14px 20px;
  }

  .bouton-village {
    width: 100%;
  }

  .navigation-images {
    gap: 10px;
  }
}
/* Petites flèches de navigation autour de l'image */

.galerie-archives {
  position: relative;
  padding: 0 45px;
}

.navigation-images {
  position: static;
  margin-top: 12px;
}

.navigation-images button {
  position: absolute;
  top: 43%;
  transform: translateY(-50%);
  width: 38px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: none;
  color: #795331;
  font-size: 32px;
  cursor: pointer;
}

#image-precedente {
  left: 0;
}

#image-suivante {
  right: 0;
}

.navigation-images button:hover {
  background: transparent;
  color: #3d291b;
}

.navigation-images button:disabled {
  opacity: 0.2;
  cursor: default;
}

#compteur-images {
  font-size: 14px;
  color: #795331;
}

@media (max-width: 600px) {
  .galerie-archives {
    padding: 0 25px;
  }

  .navigation-images button {
    width: 25px;
    font-size: 25px;
  }
}
/* Retour vers l'atelier */

/* Retour discret vers l'atelier */

.table-autrice {
  position: relative;
}

.retour-page {
  position: absolute;
  top: 12px;
  left: 45px;

  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;

  color: #f5dfb7;
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 17px;

  text-shadow: 1px 2px 4px #180d08;
  transition: color 0.2s ease;
}

.retour-page:hover {
  background: transparent;
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 750px) {
  .retour-page {
    top: 12px;
    left: 15px;
    font-size: 15px;
  }

  .table-autrice h1 {
    margin-top: 45px;
  }
}
/* Deux cadres superposés à droite */

.pile-documents {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  flex-shrink: 0;
}

.pile-documents .document {
  width: 100%;
  height: 155px;
}
.pile-documents .croquis {
  width: 85%;
  transform: translate(-10px, -46px) rotate(5deg);
}

.pile-documents .croquis:hover {
  transform: translate(-10px, -50px) rotate(5deg);
}

.pile-documents .inspirations {
	width:80%;
  transform: translate(55px, 25px) rotate(25deg);
}

.pile-documents .inspirations:hover {
  transform: translate(55px, 19px) rotate(25deg);
}
@media (max-width: 750px) {
  .pile-documents {
    width: min(85%, 360px);
    gap: 65px;
  }

  .pile-documents .document {
    width: 100%;
    height: 200px;
  }
}
@media (max-width: 750px) {
  .pile-documents .croquis {
    transform: rotate(5deg);
  }

  .pile-documents .inspirations {
    transform: rotate(-6deg);
  }

  .pile-documents .croquis:hover {
    transform: translateY(-6px) rotate(5deg);
  }

  .pile-documents .inspirations:hover {
    transform: translateY(-6px) rotate(-6deg);
  }
  .pile-documents .croquis {
  width: 85%;
  transform: rotate(5deg);
}

.pile-documents .croquis:hover {
  transform: translateY(-6px) rotate(5deg);
}
}
/* Agrandissement de la fiche de Clarence */

.zoom-image {
  position: fixed;
  width: 95vw;
  max-width: 1000px;
  max-height: 95vh;
  padding: 20px;
  border: 3px solid #8c673e;
  border-radius: 8px;
  background: #e9d8b5;
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.zoom-image::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

#image-agrandie {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.fermer-zoom {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #96744b;
  background: #d8bb8d;
  color: #4b301c;
  font-size: 24px;
  cursor: pointer;
}
/* Petite indication sous le titre de la fiche de Clarence */
.indication-zoom {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: normal;
  font-style: italic;
  color: #806b53;
}