/* ----------------------------- */
/* Base générale                 */
/* ----------------------------- */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: #f7ead2;
}

/* ----------------------------- */
/* Page d'accueil                */
/* ----------------------------- */

.accueil {
  background-color: #2b1a10;
  background-image:
    linear-gradient(rgba(20, 10, 4, 0.35), rgba(20, 10, 4, 0.55)),
    url("images/fond-bureau-livres.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bureau {
  min-height: 100vh;
  padding: 40px 24px;
}

/* ----------------------------- */
/* Titre de l'accueil            */
/* ----------------------------- */

.entete {
  max-width: 900px;
  margin: 0 auto 40px;
  text-align: center;
  padding: 24px;
  background: rgba(34, 18, 8, 0.72);
  border: 1px solid rgba(255, 226, 178, 0.35);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.entete h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  letter-spacing: 0.04em;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.65);
}

.entete p {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #ead3aa;
}

/* ----------------------------- */
/* Zone de bureau cliquable      */
/* ----------------------------- */

.table-rp {
  position: relative;
  max-width: 1600px;
  min-height: 620px;
  margin: 0 auto;
}

/* ----------------------------- */
/* Zones invisibles cliquables   */
/* ----------------------------- */

.zone-clic {
  position: absolute;
  display: block;
  border-radius: 18px;
  text-decoration: none;
  color: transparent;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* Le texte reste utile pour l'accessibilité, mais invisible à l'écran */

.zone-clic span {
  position: absolute;
  left: -9999px;
}

/* Effet lumineux au survol */

.zone-clic:hover {
  background: rgba(255, 230, 170, 0.10);
  box-shadow:
    0 0 22px rgba(255, 220, 150, 0.28),
    inset 0 0 18px rgba(255, 230, 170, 0.12);
  transform: translateY(-3px);
}

/* ----------------------------- */
/* Placement des zones cliquables */
/* À ajuster selon ton rendu     */
/* ----------------------------- */

/* Livre brun à gauche : Rapports */
.zone-rapports {
  left: 10%;
  top: 12%;
  width: 12%;
  height: 15%;
}

/* Livre bleu : Cartes */
.zone-cartes {
  left: 33%;
  top: 4%;
  width: 15%;
  height: 15%;
}

/* Livre rouge : Chroniques */
.zone-chroniques {
  left: 58%;
  top: 15%;
  width: 13%;
  height: 15%;
}

/* Livre vert : Notes */
.zone-notes {
  left: 81%;
  top: 11%;
  width: 15%;
  height: 15%;
}

/* ----------------------------- */
/* Pages internes                */
/* ----------------------------- */

.page-interne {
  min-height: 100vh;
  background-color: #2b1a10;
  background-image:
    linear-gradient(rgba(20, 10, 4, 0.65), rgba(20, 10, 4, 0.85)),
    url("images/fond-bureau-livres.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.contenu-page {
  min-height: 100vh;
  padding: 40px 24px;
}

.entete-page {
  max-width: 900px;
  margin: 0 auto 32px;
  text-align: center;
  padding: 24px;
  background: rgba(34, 18, 8, 0.78);
  border: 1px solid rgba(255, 226, 178, 0.35);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.entete-page h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.04em;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.65);
}

.entete-page p {
  margin: 0 0 16px;
  color: #ead3aa;
}

.retour {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  color: #f7ead2;
  text-decoration: none;
  background: rgba(40, 20, 10, 0.85);
  border: 1px solid rgba(255, 230, 180, 0.45);
  border-radius: 999px;
}

.retour:hover {
  background: rgba(90, 50, 20, 0.95);
}

/* ----------------------------- */
/* Index de documents            */
/* Rapports / Cartes / Chroniques */
/* ----------------------------- */

.index-documents {
  position: relative;
  max-width: 760px;
  margin: 40px auto;
  padding: 34px 30px;
  color: #3a2412;
  background:
    linear-gradient(rgba(255, 246, 220, 0.92), rgba(238, 217, 174, 0.92));
  border: 1px solid rgba(118, 82, 42, 0.75);
  border-radius: 10px;
  box-shadow:
    0 22px 45px rgba(0, 0, 0, 0.48),
    inset 0 0 25px rgba(95, 55, 20, 0.12);
}

/* Effet de feuilles décalées derrière l'index */

.index-documents::before,
.index-documents::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 244, 210, 0.88), rgba(225, 199, 150, 0.88));
  border: 1px solid rgba(118, 82, 42, 0.45);
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.index-documents::before {
  transform: rotate(-2deg) translate(-10px, 8px);
}

.index-documents::after {
  transform: rotate(2deg) translate(12px, 14px);
}

.index-documents h2 {
  margin: 0 0 20px;
  text-align: center;
  color: #2f1b0c;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.03em;
}

.index-documents p {
  margin: 0 0 22px;
  text-align: center;
  color: #5f4528;
}

.index-documents button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 13px 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  text-align: left;
  color: #3a2412;
  background: rgba(255, 248, 225, 0.65);
  border: 1px solid rgba(118, 82, 42, 0.45);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.index-documents button:hover {
  background: rgba(255, 235, 185, 0.95);
  transform: translateX(4px);
  box-shadow: 0 6px 14px rgba(70, 35, 10, 0.22);
}

/* Variante si tu veux une petite ligne descriptive sous un titre */

.index-documents button span {
  display: block;
  margin-top: 4px;
  color: #7a5a36;
  font-size: 0.9rem;
}

/* ----------------------------- */
/* Lecteur affiché après l'index */
/* ----------------------------- */

.lecteur-cache {
  display: none;
}

.lecteur-actif {
  display: block;
}

.titre-document-actif,
#titreRapport,
#titreChronique,
#titreCarte {
  max-width: 900px;
  margin: 36px auto 0;
  text-align: center;
  color: #f7ead2;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.65);
}

.retour-index {
  display: block;
  margin: 24px auto 0;
  padding: 10px 16px;
  font-family: Georgia, "Times New Roman", serif;
  color: #f7ead2;
  background: rgba(40, 20, 10, 0.85);
  border: 1px solid rgba(255, 230, 180, 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.retour-index:hover {
  background: rgba(90, 50, 20, 0.95);
  transform: translateY(-2px);
}

/* ----------------------------- */
/* Lecteur de livre / images     */
/* ----------------------------- */

.lecteur-livre {
  display: grid;
  grid-template-columns: 60px minmax(300px, 800px) 60px;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 40px auto 20px;
}

.lecteur-livre img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  background: rgba(255, 240, 200, 0.08);
}

.lecteur-livre button {
  height: 60px;
  width: 60px;
  border-radius: 999px;
  border: 1px solid rgba(255, 230, 180, 0.5);
  background: rgba(40, 20, 10, 0.85);
  color: #f7ead2;
  font-size: 2rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.lecteur-livre button:hover {
  background: rgba(90, 50, 20, 0.95);
  transform: scale(1.05);
}

.lecteur-livre button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

#compteurPage,
.compteur-page {
  text-align: center;
  color: #ead3aa;
  font-size: 1.1rem;
}

/* ----------------------------- */
/* Sections multiples            */
/* Cartes / Chroniques etc.      */
/* ----------------------------- */

.section-cartes,
.section-chroniques,
.section-rapports {
  max-width: 1000px;
  margin: 48px auto;
  padding: 24px;
  background: rgba(34, 18, 8, 0.65);
  border: 1px solid rgba(255, 226, 178, 0.22);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.section-cartes h2,
.section-chroniques h2,
.section-rapports h2 {
  margin: 0 0 18px;
  text-align: center;
  color: #f7ead2;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.03em;
}

/* ----------------------------- */
/* Listes de documents           */
/* Pour rapports/cartes/etc.     */
/* Ancien système conservé       */
/* ----------------------------- */

.liste-documents {
  max-width: 900px;
  margin: 40px auto;
  display: grid;
  gap: 18px;
}

.carte-document {
  padding: 20px 24px;
  background: rgba(34, 18, 8, 0.78);
  border: 1px solid rgba(255, 226, 178, 0.28);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.30);
}

.carte-document h2 {
  margin: 0 0 8px;
  color: #f7ead2;
}

.carte-document p {
  margin: 0 0 14px;
  color: #ead3aa;
}

.carte-document a {
  display: inline-block;
  padding: 8px 14px;
  color: #f7ead2;
  text-decoration: none;
  background: rgba(70, 35, 15, 0.9);
  border: 1px solid rgba(255, 230, 180, 0.45);
  border-radius: 999px;
}

.carte-document a:hover {
  background: rgba(110, 60, 25, 0.95);
}

/* ----------------------------- */
/* Version mobile/tablette       */
/* ----------------------------- */

@media (max-width: 800px) {
  .bureau,
  .contenu-page {
    padding: 24px 14px;
  }

  .entete,
  .entete-page {
    padding: 18px;
    margin-bottom: 24px;
  }

  .table-rp {
    min-height: 460px;
  }

  .zone-clic:hover {
    transform: none;
  }

  /*
    Placement mobile approximatif.
    À ajuster si tu veux un rendu parfait sur téléphone.
  */

  .zone-rapports {
    left: 5%;
    top: 18%;
    width: 20%;
    height: 24%;
  }

  .zone-cartes {
    left: 28%;
    top: 18%;
    width: 20%;
    height: 24%;
  }

  .zone-chroniques {
    left: 51%;
    top: 18%;
    width: 20%;
    height: 24%;
  }

  .zone-notes {
    left: 74%;
    top: 18%;
    width: 20%;
    height: 24%;
  }

  .index-documents {
    margin: 28px auto;
    padding: 24px 18px;
  }

  .index-documents button {
    font-size: 1rem;
    padding: 12px 14px;
  }

  .section-cartes,
  .section-chroniques,
  .section-rapports {
    margin: 32px auto;
    padding: 18px 12px;
  }

  .lecteur-livre {
    grid-template-columns: 44px minmax(200px, 1fr) 44px;
    gap: 10px;
    margin-top: 28px;
  }

  .lecteur-livre button {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .lecteur-livre img {
    max-height: 70vh;
  }
}